Create User
URL :v3/user/create/api
HTTP Method : POST
Response Format: JSON
Parameters:
| Parameter | Data Type | Optional/Required | Description |
| first_name | String | Required | It’s the first name of the user |
| last_name | String | Required | It’s the last name of the user |
| user_name | String | Configurable | It’s the user name of the user and it’s configurable from backend form settings |
| phone_number | String | Configurable | It’s the work phone no of the user and it’s configurable from backend form settings |
| String | Configurable | It’s the email id of the user and it’s configurable from backend form settings | |
| mobile | String | Configurable | It’s the mobile phone no of the user and it’s configurable from backend form settings |
| custom_id | String/Array | Optional | “custom_(id of the custom field)” |
| organisation[0] | array | Optional | “Id of the Organisation” |
| organisation_department[0] | array | Optional | “Id of the Organisation Department” |
| related[0]{‘org_id’:org_id,’org_dept’:org_dept} | array of objects | Optional | “Id of the Organisation and Organization Department” |
Response
- Response Format: JSON
- Returns JSON which contains below response
Sample JSON Success Response :
{
"success": true,
"message": "New user sucessfully created",
"data": {
"first_name": "Demo",
"last_name": "User",
"email": "demouser@gmail.com",
"mobile": "123456789",
"user_name": "user",
"role": "user",
"email_verify": "tyf0woROJhbh3gtLw5sHbdxlmOhTqnDnH8KAhkq6kApKOuYYZXAi5gug3Dvx",
"mobile_otp_verify": "tyf0woROJhbh3gtLw5sHbdxlmOhTqnDnH8KAhkq6kApKOuYYZXAi5gug3Dvx",
"agent_tzone": 33,
"updated_at": "2020-06-03 15:13:26",
"created_at": "2020-06-03 15:13:25",
"id": 6,
"phone_number": "123456789",
"internal_note": null,
"full_name": "Demo User",
"meta_name": "Demo User <demouser@gmail.com>"
}
}
Possible Errors/Failures:
{
"success":false,
"message":{
"field":"this field is required"
}
}
{
"success": false,
"message": {
"email": "This email/username has already been taken",
"user_name": "This email/username has already been taken",
"mobile_phone": "The mobile phone has already been taken."
}
}