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
Body
parameters| Parameter | Required | Type | Description |
|---|---|---|---|
| Authorization | Yes | String | Pass the access token in the header. Format: Bearer {access_token}. |
| 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:- You can query the IDs of DID numbers associated with the shared trunk using Query Available DID Numbers of Specific Trunk.
- Use a comma to separate multiple IDs.
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:
|
| 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]
}
]
}
Response example
HTTP/1.1 200 OK
{
"requestId": "361350ac8a83708c785177513c5331a5",
"status": "Success",
"time": 1747027810
}