Create a Group
Create a group and add one or more P-Series Cloud PBX instances to it.
Request URL
POST {base_url}/dm/open_api/v1/groups
Request parameters
Headers
Body| Parameter | Required | Type | Description |
|---|---|---|---|
| Authorization | Yes | String | Pass the access token in the header. Format: Bearer {access_token}. |
| Parameter | Required | Type | Description |
|---|---|---|---|
| groupName | Yes | String | The name of the group. Note: The maximum
length is 127 characters. |
| pbxIdList | No | Array<Integer> | The ID(s) of the P-Series Cloud PBXs to be added to the
group. Note:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | Object<Details> | The detailed information. |
| 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.
|
Details
| Parameter | Type | Description |
|---|---|---|
| id | Integer | The ID of the group. |
Example
Request example
Create a group.
POST /dm/open_api/v1/groups HTTP/1.1 Host: ycm.yeastar.com Authorization: Bearer ****** Content-Type: application/json { "groupName":"API-Created Group", "pbxIdList":[389283,96569] }
Response example
HTTP/1.1 200 OK { "data": { "id": 20039 }, "requestId": "5a2815c66a3eedeea5f1938d36a914d5", "status": "Success", "time": 1775724942 }