---
schema_version: "1"
id: 4716bd2deb68c7c4e3ca852e64554633f9b1569a4c1a30ce27d2b3b303e82102
title: GET /messaging/v1/sms/messages/?type=notSent
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/getSMSMessagesNotSent.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_transactional_messaging_sms/getSMSMessagesNotSent.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 91a65aa6797b9c88e6de74e4aa00d2b91c3039f7edec7c6b5003519ea8caab90
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# GET /messaging/v1/sms/messages/?type=notSent

Gets a paginated list of messages that weren't sent, ordered from oldest to newest.

## URL Parameters

| Name          | Type    | Description                                                                                                                                                                                            |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `type`        | string  | Required. Only notSent is supported.                                                                                                                                                                   |
| `$pageSize`   | integer | Number of messageKeys (array elements) to return per response page.                                                                                                                                    |
| `lastEventId` | integer | Event ID from which you want the response to start. To obtain the initial event ID, submit a request without a lastEventId. The events in the response are listed top to bottom from oldest to newest. |

### Responses

| Status  | Name              | Type    | Description                                                                                                                                                                                                                                     |
| ------- | ----------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **200** | &nbsp;            | &nbsp;  | **Success. Review example response.**                                                                                                                                                                                                           |
| &nbsp;  | lastEventID       | integer | Event ID from which you want the response to start. To obtain the initial event ID, submit a request without a lastEventId. The events in the response are listed top to bottom from oldest to newest.                                          |
| &nbsp;  | statusCode        | integer | Integer value of the reason the send didn't complete. Review Send Error Codes for more information.                                                                                                                                             |
| &nbsp;  | statusMessage     | string  | The reason the send didn't complete. Review Send Error Codes for more information.                                                                                                                                                              |
| &nbsp;  | eventCategoryType | string  | TransactionalSendEvent event type. SMSSent indicates that the message was sent for delivery. SMSNotSent indicates that the message wasn't sent and includes the reason. SMSQueued indicates that the SMS hasn't yet been processed for sending. |
| &nbsp;  | timestamp         | string  | Time the event occured in Central Standard Time without daylight saving time applied.                                                                                                                                                           |
| &nbsp;  | definitionKey     | string  | Unique identifier of the definition.                                                                                                                                                                                                            |
| &nbsp;  | eventID           | integer | Numeric identifier of the event.                                                                                                                                                                                                                |
| &nbsp;  | messageKey        | string  | Unique identifier to track message send status.                                                                                                                                                                                                 |
| &nbsp;  | contactKey        | string  | Unique identifier for a subscriber.                                                                                                                                                                                                             |
| &nbsp;  | to                | string  | Channel address of the recipient. For SMS, it’s the recipient's mobile address.                                                                                                                                                                 |

## Usage

This sample request shows how to retrieve unsent SMS messages for a specified SMS event.

```
Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
GET /messaging/v1/sms/messages/?type=notSent&$pagesize=20&lastEventId=35759
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
```

The response is an HTTP 200 response that contains information about the unsent messages.

```json
{
  "lastEventID": 35774,
  "messages": [
    {
      "statusCode": 24,
      "statusMessage": "Error Message",
      "eventCategoryType": "TransactionalSendEvents.SMSNotSent",
      "timestamp": "2018-12-17T13:05:40.947",
      "definitionKey": "account-reset",
      "eventID": 35760,
      "info": {
        "messageKey": "2iQNfGHj2UqTalK9x2gPow",
        "contactKey": "example1"
      }
    }
  ],
  "count": 1
}
```

## HTTP Responses

| Response           | Reason                            |
| ------------------ | --------------------------------- |
| 200 `OK`           | Success. Review example response. |
| 400 `Bad Request`  | Invalid request                   |
| 401 `Unauthorized` | Failed to pass authorization.     |
| 500 `Server Error` | Internal error                    |
