Add a Message Queue

Add a message queue, including setting chat assignment mode, as well as assigning agents for the queue.

Request URL

POST {base_url}/{api_path}/message_queue/create?access_token={access_token}

Request parameters

Parameter Required Type Description
name Yes String The name of the message queue.
assignment_mode Yes 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 Yes Array<Members> The agents in the message queue.
Members
Parameter Required Type Description
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.
id Integer The unique ID of the message queue.

Examples

Request example

POST /openapi/v1.0/message_queue/create?access_token=BkkrLotuuRnrxaOYAFXXshPz1Ot1OeCd HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json

{
    "name":"docs-message-queue",
    "assignment_mode":"auto",
    "members":[
        {"extension_id":137},
        {"extension_id":138}
    ]
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "id": 20
}