Update Trunk Access Permissions for Specific User

Update trunk access permissions for a specific subordinate user.

Important: The existing permission configuration for the user will be completely overwritten by the data provides in this request. To avoid permission loss, ensure your request includes all trunks and DIDs you wish the user to retain access to.

Request URL

PUT {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 Trunk Access Permissions.
trunkDidList Yes Array<Trunk_Info> The IDs of the shared trunk and associated DID numbers that are to be assigned.
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:

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

PUT /dm/open_api/v1/trunk_acl HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******
Content-Type: application/json
{
    "userId": 359054,
    "trunkDidList": [
        {
            "trunkId": 112129,
            "didIds": [1186850]
        }
    ]
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "687fed0539192d62ddd9a9ae5117e022",
  "status": "Success",
  "time": 1766394648
}