Add DID Numbers

Add one or more DID numbers and associate the numbers with shared trunks.

Request URL

POST {base_url}/dm/open_api/v1/did_management

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Body parameters
Parameter Required Type Description
didList Yes Array<String> The list of DID numbers.
Note:
  • The format of DID numbers should be +xxx or xxx.
  • Use a comma to separate multiple DID numbers.
didName No String The name of the DID number(s).
Note: The length of the name should not exceed 127 characters.
trunkIds Yes Array<Integer> The ID list of the trunk(s) to which the DID number(s) are assigned.
Note:

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.

Example

Request example

POST /dm/open_api/v1/did_management HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******
Content-Type: application/json
{
    "didList": [
        "+442079461101","+442079461105","+442079461107"
    ],
    "didName": "Europe_Trunk_London_DIDs",
    "trunkIds": [
        6679,6682
    ]
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "44151421047434e0ef817a10fc5331a5",
  "status": "Success",
  "time": 1747027810
}