post https://api.servetel.in/v1/user
This API allows you to create a new User.
Sample Request
curl --request POST \
--url https://api.servetel.in/v1/user \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"create_agent": true,
"create_web_login": true,
"status": true,
.......
}
'
📘 Important!
Before we begin, note that the * sign denotes the mandatory variables in each table.
Request Variables (Body Params)
The following parameter is required to create a user:
Variable Name | Description | Data Type |
---|---|---|
name* | Name of the user | string |
number* | Mobile number of the user. | string |
create_agent* | Whether you want to create the user or not. | Boolean |
email* | Email ID of the user. | string |
login_id* | Define login ID for web login. For example: testuser. | string |
user_role* | Role ID defined for the user, it can be extracted by editing the role on the web panel and copying it from the URL. | int |
password* | Define password for web login. | string |
status* | Status of the user. Enabled/Disabled | Boolean |
caller_id* | Define IDs of the numbers allotted to user. It can be extracted via GET MyNumbers API. | array of integer. |
block_web_login | Block access to web login. | Boolean |
user_for_cdr | Users defined for user to see the CDRs. | object (user_for_cdr) |
login_based_calling | Whether calling would work based on logging to the application. | Boolean |
agent_group | The agent groups to allot on a user. For example, sales group. | array of strings. |
department | The departments to allot to a user. For example, Sales Department, Finance Department. Note: The departments are separated by commas. | array of strings. |
time_group | The timegroup to allot to a user. For example, Evening Shift. | string |
create_extension | Whether extension is to be created for the user. | Boolean |
enable_calling | To create logins and make the user workable for calling functionality | Boolean |
Response Variables
The response returned is as following:
Variable Name | Description | Data Type |
---|---|---|
Success | The request success status, the possible values are: True (default) for success. False for failure. | Boolean |
Message | The message corresponding to the success status. For example, in 400 Response where the "success" variable pops as True, the message displayed is shown here. | String |
Error | The error type is shown is here, if any variable input is not selected properly. | Object |