Queue
Method#
/queue#
GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/queue
Header#
| Key | Value |
|---|---|
| Client-Token | ACCOUNT SECURITY TOKEN |
Concept#
This method is responsible for returning all messages that are in your queue waiting to be processed.
Attributes#
Required#
| Attributes | Type | Description |
|---|---|---|
| page | integer | Used for pagination, you need to inform here the message page you want to retrieve |
| pageSize | integer | Specify the size of the message return per page |
Optionals#
| Attributes | Type | Description |
|---|---|---|
Request Params#
URL example#
Method
GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/queue?page=1&pageSize=100
or
GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/queue/count
Response#
200#
| Attributes | Type | Description |
|---|---|---|
| size | string | Number of messages in queue |
| messages | array string | Array with queue messages |
Messages Array
| Attributes | Type | Description |
|---|---|---|
| size | string | Number of messages in queue |
| Message | string | Text message |
| Phone | string | Recipients phone |
| ZaapId | string | Z-API message ID |
| Created | timetamp | Messages date |
| MessageId | string | Message ID |
Example
405#
Neste caso certifique que esteja enviando o corretamente a especificação do método, ou seja verifique se você enviou o POST ou GET conforme especificado no inicio deste tópico.
415#
In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”