Assign a DID Direct Destination

Assigns one or more DIDs to a direct destination at the tenant level, such as a user, a queue, an IVR, a ring group, or an AI receptionist.

Request URL

POST {base_url}/uc-cconfig/api/v1/tenant-dids/direct-assignment

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
destinationType Yes String

The type of the direct destination.

Valid value:

  • USER: An extension user.
  • QUEUE: A queue.
  • IVR: An IVR.
  • RING_GROUP: A ring group.
  • AI_ROUTE: An AI receptionist.
destinationId Yes String The resource ID of the destination. The value must be greater than 0. You can obtain the ID using the Search Destination Resources interface.
didIds Yes Array<String> The list of DIDs to assign. At least one DID is required, and each value must be greater than 0. You can obtain the IDs using the Search Tenant DIDs 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<Assign_Result> The assignment result.
Assign_Result
Parameter Type Description
directDidNumbers Array<Direct_DID_Number> The list of DIDs that are assigned to the destination.
failures Array<Direct_DID_Conflict> The list of DIDs that conflict with an existing destination. This parameter is empty when the request succeeds; the details are returned only in a 422 DID_DIRECT_OCCUPIED error response.
Direct_DID_Number
Parameter Type Description
id String The ID of the DID.
number String The DID number in default display format.
name String The name of the DID.
Direct_DID_Conflict
Parameter Type Description
destinationType String The type of the destination that already occupies the DID.
destinationNumber String The extension number of the occupying destination.
destinationName String The name of the occupying destination.
destinationId String The resource ID of the occupying destination.

Example

Request example

POST /uc-cconfig/api/v1/tenant-dids/direct-assignment HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoicGFzc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niWY2PJszVp2XswULShQoXuMsXw
x-tenant-code: jint
Content-Type: application/json
{
  "destinationType": "USER",
  "destinationId": "338136731335409664",
  "didIds": [
    "367178921942994944"
  ]
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "21a76d8033b403545cc6aaec62f26e5d",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "directDidNumbers": [
      {
        "id": "367178921942994944",
        "number": "364726328",
        "name": "cc测试"
      }
    ],
    "failures": []
  }
}