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:
  • none: Agents cannot pick up sessions.
  • auto: The first agent to respond will automatically pick up the session.
  • manual: Agents can take over the session by clicking the Pick Up button.
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:
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

Table 1.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

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"
}