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:
|
| 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
| 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.
|
| 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 }