Skip to main content

Read Messages from Queue

This endpoint allows to get batch of messages from the message queue.

Request

GET <API base url>/queue

URL query parameters

NameTypeRequiredDescription
takeint32yesSize of batch.
referencestringnoReference to some external entity, which messages are related to (e.g. campaign ID in CRM). If specified then only messages related to the reference specified will be returned by the endpoint.

Response

On success:

[
{
"id": required int64, // Unique message identifier
"settingsId": required int64, // Reference to settings to be used for message
// (content templates and other)
"to": required { // Message recipient
"id": required int64 // Unique contact/customer identifier
},
"variables": optional { // Key-value dictionary of message variables
"someVar": "some value",
"anotherVar": 12345,
...
}
},
...
]

Example:

[
{
"id":6637960,
"settingsId":2441,
"to":{
"id":34521212
},
"variables":{
"tid":"XF5K"
}
},
{
"id":6637961,
"settingsId":2441,
"to":{
"id":546564534
},
"variables":{
"tid":"XF5L"
}
},
{
"id":6637962,
"settingsId":2441,
"to":{
"id":234345635
},
"variables":{
"tid":"XF5M"
}
}
]