Get Available DIDs for Tenant

Retrieves the list of DIDs that are available for assignment to a target tenant on a specified trunk.

Request URL

POST {base_url}/uc-cconfig/api/v1/tenants/available-dids

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
trunkId Yes String The ID of the trunk to filter DIDs by.
keyword No String The keyword used to search for DIDs by number or name.
ownerId Yes String The account ID of the target tenant's owner. Same as ownerId in List Assignable Trunks.

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.

dids Array<DID_Option> The list of DIDs available for assignment.
DID_Option
Parameter Type Description
id String The ID of the DID.
didNumber String The DID number, which prefers the default display format and falls back to the E.164 number.
didName String The name of the DID.
numberType String The type of the number.
assigned Boolean

Whether the DID is assigned to the current tenant. This parameter is used to render the existing DIDs in the edit scenario.

  • true
  • false