Add a Tenant Phone

Adds a phone to the current tenant. The phone automatically belongs to the current tenant.

Request URL

POST {base_url}/uc-cautop/api/v1/tenant/phones

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
vendor Yes String The identifier of the phone vendor.
model Yes String The model of the phone. The template must support this model.
mac Yes String The MAC address of the phone.
templateId Yes String The ID of the configuration template, which must match the vendor and support the model. You can obtain the ID using the Get Phone Template Options interface.
firstAuth No Boolean Whether to enable first-time authentication.
hotDesking No Boolean Whether to enable Hot Desking.
emergencyCallerId No String The emergency caller ID.
userId No Integer The ID of the user whose extension is bound to the phone. This parameter is mutually exclusive with accounts.
accounts No Array<Account_Item> The list of accounts to bind to the phone lines. This parameter is mutually exclusive with userId.
configJson No String The custom configuration values in JSON format, which overrides the template configuration. This parameter is used for DECT phones.
Account_Item
Parameter Required Type Description
lineIndex No Integer The line index or handset number of the phone. For DECT phones, this parameter specifies the handset; for regular phones, the default value is 1.
userId No Integer The ID of the user whose extension is bound to this line. You can obtain the ID using the Get Bindable Extensions interface.

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.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
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<Create_Result> The creation result.
Create_Result
Parameter Type Description
id String The ID of the created phone.

Example

Request example

POST /uc-cautop/api/v1/tenant/phones HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MjU2NDE0MCwiaWF0IjoxNzkyNTQyNTQwLCJqdGkiOiJlYTFhNTY3NS1hNWFhLTQ0ZjYtOWJlYy02YmQzZmY1NmU0YTIiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.roCif8Pv80MWNHH0IQgaDxQS4hx-V-zbU1Zid56qqlAEoSV5Xisv-Rh1tPnWiDqxHUJoMXE8FFDgK_JS2wGBJF6Qz5VD8HMSQFeiHgHlqrKHbOUlf4SiCz8Qww0xX2gsCq0JPS3snT5MrvRIHyyFtMVTNMCe9HgAv_yT1KntyE6GuHA8OTTWTUvfRRkOdX9PgdcRpl3w0sOrPel_HBjUmYAzQm6hYMP-Aj9ygjFCVuqc91Al_6Oc5nuJsue923LbFBzp-2kKKPXGGJIm66xDLBOOgg6NbRcUv30uJuiaYMjJPUX90jNeXLoKuvEVmMdiYKEB02Si3sjtoX6pUHLcLQ
x-tenant-code: jint
Content-Type: application/json
{
  "vendor": "Fanvil",
  "model": "H6W",
  "mac": "AA:6A:D8:07:E9:CB",
  "templateId": "363237944809508864",
  "hotDesking": false
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "f91eb540e1c86bbcbfe2ed5abdb255b7",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "id": "371093126764687360"
  }
}