Update the Customer(s) of a Cloud PBX

Update the associated customer(s) of a specific Cloud PBX.

Request URL

PUT {base_url}/dm/open_api/v1/cloud_pbx/instances/{cloudPbxId}/customers

Request parameters

Path parameter
Parameter Required Type Description
cloudPbxId Yes Long The ID of the Cloud PBX.
Note: You can query the Cloud PBX ID using Query All the Cloud PBXs.
Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Body
Parameter Required Type Description
customerIds Yes Array <Long> The ID(s) of the customer(s).
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

Add a customer (ID: 50086182) to a Cloud PBX (ID: 41567), which has already associated with another customer (ID: 50329411).
PUT /dm/open_api/v1/cloud_pbx/instances/41567/customers HTTP/1.1
Host:ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwidmVyc2lvbiI6MTY2Mzc0MTEyNSwicmVmcmVzaFZlcnNpb24iOjE2NjQ0NDU0NTh9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0NDQ3MjU4LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJiYWNjYjljZi05ZmI0LTRiN2MtODE1My1jOGRkMDU5YTIyMGEiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9.NJVb0janc3OcC9AFUpAUGJiXTQtnLR7y71chtKCzDTo
Content-Type: application/json
{
   "customerIds":[50329411,50086182]
}
Response example
HTTP/1.1 200 OK
{
  "requestId": "097f7e719340c2ddbc7406610b736978",
  "status": "Success",
  "time": 1664445526
}