users
Create a new user
Create a new user. For staff users (admin, marketing, customer support, operation), upline_id and network relationships are ignored. For regular users, commission_plan_id is required.
post/users
Request body
Example request
{
"name": "John Doe",
"email": "john.doe@example.com",
"password": "password123",
"commission_plan_id": 1,
"upline_id": 1,
"takaful_status": "inactive",
"role_ids": [
1,
2
]
}Response
User created successfully
Example response
{
"user_id": 1,
"name": "John Doe",
"email": "john.doe@example.com",
"registration_date": "2024-01-01T00:00:00.000Z",
"takaful_status": "inactive",
"commission_plan_id": 1,
"roles": [
{
"user_role_id": 1,
"role_id": 1,
"role_name": "admin",
"start_date": "2024-01-01T00:00:00.000Z"
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.