Add a Reseller
Adds a reseller account.
Request URL
POST {base_url}/uc-user/api/v1/accounts/resellers
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code No String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description firstName No String The first name of the user. This parameter and lastName cannot both be empty. lastName No String The last name of the user. This parameter and firstName cannot both be empty. email Yes String The email address of the account, which is used as the login username and must be globally unique. company No String The company name. phone No String The phone number. Only digits, letters, spaces, and the characters ().-+*# are allowed. address No String The address. remark No String The remark of the account. profileImageResourceId No Integer The resource ID of the avatar. Upload the avatar file to the resource service first and pass in the returned resource ID. null or 0 indicates that no avatar is set, and a non-zero value sets the avatar. tenants No Object<Resource_Quota> The tenant quota. users No Object<Resource_Quota> The user quota. concurrentCalls No Object<Resource_Quota> The concurrent call quota. recordingUsers No Object<Recording_Users_Quota> The recording user quota. brandingTemplates No Object<Resource_Quota> The branding template quota. The value of total must be 0 or 1. awsTranscriptionUsers No Object<Resource_Quota> The transcription user quota. receptionistMinutes No Object<Resource_Quota> The AI receptionist minutes quota. receptionistPacks No Object<Receptionist_Pack_Quota> The AI receptionist pack quota. permissionIds No Array<Integer> The list of permission IDs. A null value uses the default role permissions, a non-empty list assigns the specified permissions which must be a subset of the operator permissions, and an empty list is not allowed. sendActivationEmail No Boolean Whether to send an activation email. true (default) saves the account and sends the activation email, and false saves the account only. systemLanguage No String The initial system language, which is used to initialize the preference settings.
Valid value:
enzh
tenantOemId No Integer The default OEM ID used when creating a tenant. null indicates that the value follows the parent administrator, and 0 indicates the standard edition.
- Resource_Quota
-
Parameter Required Type Description total Yes Integer The quota amount. A value greater than 0 assigns a quota of the specified amount, -1 indicates unlimited, and other values less than or equal to 0 are invalid and skipped. This parameter is required when the parent field is not null.
- Recording_Users_Quota
-
Parameter Required Type Description details No Array<Retention_Detail_Quota> The quota details of different retention periods. A null value indicates that the recording user quota is not changed.
- Retention_Detail_Quota
-
Parameter Required Type Description unitValue Yes Integer The value of the retention period, such as 1. unit Yes String The unit of the retention period.
Valid value:
MONTHDAYYEAR
total Yes Integer The quota amount. A value greater than 0 assigns a quota, -1 indicates unlimited, and other values less than or equal to 0 are invalid.
- Receptionist_Pack_Quota
-
Parameter Required Type Description details No Array<Pack_Detail_Quota> The quota details of different pack capacities. A null value indicates that the pack quota is not changed, and an empty array clears all pack quotas.
- Pack_Detail_Quota
-
Parameter Required Type Description unitValue Yes Integer The capacity of the pack in minutes, such as 100 or 1000. unit Yes String The unit of the pack capacity. The value is fixed to min. total Yes Integer The number of packs allocated from this capacity. A value greater than 0 assigns packs, 0 keeps the entry without allocating packs, and a value less than 0 is invalid (packs do not support unlimited).
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<Account_Detail> | The details of the created reseller account. |
- Account_Detail
-
Parameter Type Description id String The ID of the account. ucId String The UC ID of the company that the account belongs to. subType String The sub type of the user:
SUPER: The super administrator.ADMIN: The administrator.RESELLER: The reseller.
This parameter is visible only to the super administrator.
status String The status of the account. firstName String The first name of the user. lastName String The last name of the user. email String The email address of the account, which is used as the login username. company String The company name. phone String The phone number. address String The address. profileImage String The URL of the avatar. owner String The email of the owner account. This parameter is visible only to the super administrator. ownerId Integer The ID of the owner account. This parameter is visible only to the super administrator. twoFactorEnabled Boolean Whether two-factor authentication is enabled. twoFactorMethod String The verification method of two-factor authentication:
AUTHENTICATOR: The authenticator app (TOTP).EMAIL: The email verification code.
This parameter is null when two-factor authentication is not enabled.
remark String The remark of the account. isPrimaryAccount Boolean Whether the account is a primary account. createTime Integer The time when the account was created, in Unix timestamp format (milliseconds). updateTime Integer The time when the account was last updated, in Unix timestamp format (milliseconds). systemLanguage String The system language. tenantOemId Integer The default OEM ID used when creating a tenant. The value 0 indicates the standard edition. This parameter is returned only when the OEM switch is enabled.
Example
Request example
POST /uc-user/api/v1/accounts/resellers HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJtdDEwMDBAbWFpbHN0YXIudG9wIiwiYXBwX2tleSI6Im9icWJUSWd1ZkJ5d3ZCNmF0VURmVDZpeDJvUlhUb0wzIiwiZ3JhbnRfdHlwZSI6Im9wZW5hcGkiLCJjbGllbnRfZXh0Ijp7ImRlc2NyaXB0aW9uIjoi56ys5LiJ5pa55ZCI5L2c5LyZ5Ly05bqU55SoIiwicGFydG5lciI6IuekuuS-i-WQiOS9nOS8meS8tCJ9LCJjbGllbnRfdHlwZSI6Im9wZW5hcGkiLCJleHAiOjE3OTIwNzI3NTcsImlhdCI6MTc5MjA1MTE1NywianRpIjoiOTVkOGM1YWMtNzg3MS00ZjlmLWFiOWUtYzFjOTBlYzU4N2M1IiwiY2xpZW50X2lkIjoibm92by1vcGVuLXBsYXRmb3JtIiwidXNlcl9leHQiOnsicm9sZUlkcyI6WzNdLCJzdHlwZSI6IkFETUlOIiwidGVuYW50Q29kZSI6bnVsbCwidHlwZSI6IlBfQUNDT1VOVCIsInVzZXJJZCI6MjA4NTMxNTk0ODg0OTgyNzg0MiwiZW1haWwiOiJtdDEwMDBAbWFpbHN0YXIudG9wIiwidXNlcm5hbWUiOiJtdDEwMDBAbWFpbHN0YXIudG9wIiwidWNJZCI6MjA4NTMxNTk0ODI4Nzc5MTEwNn19.AmC_hWm0Pa51VbO2YaQZF3gXofw5NQDi_njH-fPAi2r_kWc8PyxkK6vq212lTPHR-eDMY3CaXhUxptGNcUUXAHfbuFqHXBcLvZ1ggmMCYLlSpcsj9TBg3BULyvHOlJBEbO7b_OOBZi_fGG-Oe3e9m-EsdOjA150ZJKU9trq-QUqFndTvdMZV9JHDV2xpDwgKdT6v4xNhM9TaAT9_tLmOtSipIijx32ng8CIDd0l7jWYfrmwsjf32n0P232nXmKfdADjSuKAp8TNxc17ccFxt9k0aQlB9uyhGPjIdCHSK7hill2VbzVAGuVzj3b1AplQz2cAVmVhXqWqOfpfjM1tY9A
Content-Type: application/json
{
"firstName": "Doc",
"lastName": "Reseller",
"email": "aitdoc-r51280@mailstar.top",
"company": "AIT Doc Test Inc",
"phone": "13900139000",
"address": "Test Ave 2",
"remark": "ait-doc-test-reseller",
"tenants": {
"total": 5
},
"users": {
"total": 10
},
"concurrentCalls": {
"total": 20
},
"sendActivationEmail": false
}
Response example
HTTP/1.1 200 OK { "result": { "id": "2110642174721605633", "ucId": "2110642175052955650", "status": "INACTIVE", "firstName": "Doc", "lastName": "Reseller", "email": "aitdoc-r51280@mailstar.top", "company": "AIT Doc Test Inc", "phone": "13900139000", "address": "Test Ave 2", "twoFactorEnabled": false, "remark": "ait-doc-test-reseller", "isPrimaryAccount": true, "createTime": 1792051283027, "updateTime": 1792051283027, "systemLanguage": "en", "tenantOemId": 84 }, "requestId": "8b84b0b76ef5c5c32e0a1e9fba3be39d", "code": "200", "message": "SUCCESS" }