Grant Trunk Access Permissions to Specific User

Grant access permissions of one or more shared trunks and their DID numbers to subordinate users.

Request URL

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

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
userId Yes Long The ID of the subordinate user.
Note: You can query the user ID using Query All Subordinate Users.
trunkDidList Yes Array<Trunk_Info> The shared trunk ID and the ID list of the associated DID numbers.
Trunk_Info
Parameter Required Type Description
trunkId Yes Integer The ID of the shared trunk to be assigned.
Note: You can query the trunk ID using Query Available Shared Trunks.
didIds Yes Array<Integer> The ID list of the DID numbers to be assigned.
Note:
allocatedMaxConcurrentCalls No Integer Set the concurrent call limit for this user on the shared trunk.
Note:
  • If provided, the value must be an integer between 1 - 99999.
  • If omitted, it indicates no limit, the user can utilize the trunk's maximum concurrent capacity.

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/trunk_acl HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******
Content-Type: application/json
{
    "userId": 359054,
    "trunkDidList": [
        {
            "trunkId": 325,
            "didIds": [1185793],
            "allocatedMaxConcurrentCalls":50
        }
    ]
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "361350ac8a83708c785177513c5331a5",
  "status": "Success",
  "time": 1747027810
}