---
schema_version: "1"
id: 2b190ccedfab2c07967f0bd6c732eac0a8a3e3674ac2aef61eb78e3c00e446cd
title: GET /messaging/v1/sms/definitions/{definitionKey}/queue
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/getSMSQueueMetricsForDefinition.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_transactional_messaging_sms/getSMSQueueMetricsForDefinition.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 705f8e3882c0fc1d1765a15738157a3c454c72749fad526b0485e8fc0b447a91
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# 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.

```js
HTTP/1.1 200 OK
{
  "requestId": "ba9633fa-5c8d-4c42-8efa-a16412ac0c53",
  "count": 22,
  "ageSeconds": 45
}
```
