Skip to main content

Read Messages from Queue

This endpoint returns a batch of messages from the message queue.

Request

GET <API base URL>/queue

URL query parameters

NameTypeRequiredDescription
takeint32yesSize of the batch.
referencestringnoReference to an external entity that messages are related to (e.g. a campaign ID in CRM). If specified, only messages related to that reference are 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 settings)
"customerId": required int64, // Unique customer identifier
"variables": optional { // Key-value dictionary of message variables
"someVar": "some value",
"anotherVar": 12345,
...
}
},
...
]

Example:

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