GET /messaging/v1/sms/definitions/{definitionKey}/queue

Retrieves metrics for the messages associated with a send definition, including messages that haven’t been processed yet.

URL Parameters 

NameTypeDescription
definitionKeystringRequired. The unique identifier of the definition.

Usage 

This example checks the queue depth and age of the oldest record that hasn’t been processed. If you set a definition to inactive and continue to send message requests to it, the count and age increase.

1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2GET /messaging/v1/sms/definitions/{definitionKey}/queue
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN

If the request is successful, the response includes a unique ID for the request. It also includes the number of records that are waiting to be processed in the queue and the age of the oldest unprocessed record in the queue.

1HTTP/1.1 200 OK
2{
3  "requestId": "ba9633fa-5c8d-4c42-8efa-a16412ac0c53",
4  "count": 22,
5  "ageSeconds": 45
6}

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!