Edit a Message Queue
Update the settings of a specific message queue.
Request URL
POST {base_url}/{api_path}/message_queue/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of the message queue. Note: You can query the message queue ID
using Search Specific Message Queues. |
| name | No | String | The name of the message queue. |
| assignment_mode | No | String | The assignment mode of chat sessions sent to the message
queue. Valid value:
|
| members | No | Array<Members> | The agents in the message queue. |
- Members
-
Important: All original entries you wish to retain must be submitted, as partial updates are not supported.
Parameter Required Type Description id No Integer The unique ID of the agent. Note:- This parameter is REQUIRED updating an existing entry.
- You can query the existing agent ID using Query Information of a Message Queue.
extension_id Yes Integer The unique ID of the agent's extension. Note: You can query the extension ID using Search Specific Extensions.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
Examples
Request example
Add an agent (ID: 26) to a message queue (ID: 20).
POST /openapi/v1.0/message_queue/update?access_token=BkkrLotuuRnrxaOYAFXXshPz1Ot1OeCd HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
"id":20,
"members":[
{"extension_id":137},
{"extension_id":138}, //Retain all original agents; otherwise, existing settings will be overwritten.
{"extension_id":26}
]
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS"
}