Add a User
Adds a user.
Request URL
POST {base_url}/uc-cconfig/api/v1/users
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description extension Yes String The extension number of the user, which is a 1 to 11 digit number that cannot start with 0. firstName No String The first name of the user. Either firstName or lastName is required. The maximum length is 63 characters. lastName No String The last name of the user. The maximum length is 63 characters. email No String The email address of the user. The maximum length is 127 characters. mobile No String The mobile number of the user in E.164 format, such as +8613800138000.userRole No String The role of the user.
Valid value:
ROLE_USER: A normal user.ROLE_ADMIN: An administrator.
If not specified,
ROLE_USERis used.jobTitle No String The job title of the user. The maximum length is 127 characters. registerInfo Yes Object<Register_Info_Input> The registration information of the user. userPassword Yes String The user password, in plaintext or RSA-JWE ciphertext. After decryption, the value must be 8 to 127 characters. advancedSettings No Object<Advanced_Settings_Input> The advanced settings of the user.
- Register_Info_Input
-
Parameter Required Type Description callerId No String The caller ID of the user. registrationPassword Yes String The plaintext or RSA-JWE ciphertext registration password. After decryption, the value must be 8 to 127 characters. registrationName No String The registration name. If omitted, it is generated by the system. The maximum length is 50 characters. ipPhoneConcurrent No Integer The maximum concurrent calls for IP phones, ranging from 0 to 10. The default value is 1. mobileConcurrent No Integer The maximum concurrent calls for mobile clients, ranging from 0 to 10. The default value is 1. desktopConcurrent No Integer The maximum concurrent calls for desktop clients, ranging from 0 to 10. The default value is 1. webConcurrent No Integer The maximum concurrent calls for web clients, ranging from 0 to 10. The default value is 1.
- Advanced_Settings_Input
-
Parameter Required Type Description dtmfMode No String The DTMF mode.
Valid value:
RFC4733RFC2833INFOINBANDAUTO
If not specified,
RFC4733is used.transport No String The transport protocol.
Valid value:
UDPTCPTLS
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<User_Brief> | The added user. |
- User_Brief
-
Parameter Type Description id String The ID of the user. extension String The extension number of the user. firstName String The first name of the user. lastName String The last name of the user. email String The email address of the user. mobile String The mobile number of the user. userRole String The role of the user:
ROLE_USERROLE_ADMIN
currentPresence String The current presence status of the user:
AVAILABLEAWAYDNDLUNCHBUSINESS_TRIPOFF_WORK
createdAt String The time when the user was created, in Unix timestamp format (milliseconds). updatedAt String The time when the user was last updated, in Unix timestamp format (milliseconds). avatarUrl String The avatar URL of the user.