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

Name Type Description
definitionKey string Required. 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.

Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
GET /messaging/v1/sms/definitions/{definitionKey}/queue
Content-Type: application/json
Authorization: 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.

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