---
title: "List SMS messages"
canonical: "https://bird.com/docs/api/reference/list-sms-messages"
---

# List SMS messages

`GET /v1/sms/messages`

Returns the workspace's SMS messages as a cursor-paginated list, newest
first. Filter by direction, status, category, recipient, sender, failure
reason, tag, or creation time; pass the response's `next_cursor` back as
`starting_after` to fetch the next page. To follow a single message's
delivery, use [Get an SMS message](/docs/api/reference/get-sms-message)
instead.

Messages are retained for **30 days**. A `created_after` earlier than that
is accepted and raised to the retention bound rather than rejected, so a
wider window returns what is still retained instead of failing. Messages
older than the retention window cannot be retrieved.

## Code samples

**TypeScript**

```ts
for await (const msg of bird.sms.list({ direction: "outbound" })) {
  console.log(msg.id, msg.status);
}
```

Examples: [TypeScript](/docs/api/reference/list-sms-messages.ts.md) · [Python](/docs/api/reference/list-sms-messages.py.md) · [PHP](/docs/api/reference/list-sms-messages.php.md) · [CLI](/docs/api/reference/list-sms-messages.cli.md) · [MCP](/docs/api/reference/list-sms-messages.mcp.md) · [cURL](/docs/api/reference/list-sms-messages.curl.md)

## Example response `200`

```json
{
  "data": [
    {
      "id": "sms_01krdgeqcxet5s7t44vh8rt9mg",
      "direction": "outbound",
      "status": "scheduled",
      "to": "+15551234567",
      "from": "+15557654321",
      "text": "Your order has shipped and is on its way.",
      "category": "transactional",
      "requested_language": "pt-BR",
      "resolved_language": "pt-BR",
      "template_id": "smt_01krdgeqcxet5s7t44vh8rt9mg",
      "template_version_id": "smv_01krdgeqcxet5s7t44vh8rt9mg",
      "template_content_hash": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
      "segments": {
        "count": 1,
        "encoding": "GSM_7BIT",
        "characters": 41
      },
      "cost": {
        "amount": "0.00990",
        "currency_code": "USD",
        "transaction_amount": "0.00790",
        "passthrough_amount": "0.00200"
      },
      "tags": [
        {
          "name": "category",
          "value": "welcome"
        }
      ],
      "options": {
        "smart_encoding": true
      },
      "carrier": "Verizon",
      "mcc_mnc": "311480",
      "last_error": {
        "code": "invalid_destination",
        "description": "Carrier filtered as spam"
      },
      "created_at": "2026-05-21T12:00:00Z"
    }
  ],
  "next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
  "prev_cursor": null,
  "refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}
```

## Query parameters

- `limit` (integer): Maximum number of items to return per page.
- `starting_after` (string): Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
- `ending_before` (string): Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
- `created_after` (string): Limits the response to resources created at or after this timestamp. Combine it with `created_before` to select a time window. Use an RFC 3339 timestamp with a timezone offset.
- `created_before` (string): Limits the response to resources created before this timestamp. Combine it with `created_after` to select a time window. Use an RFC 3339 timestamp with a timezone offset.
- `direction` (string)

  Filter by direction. Omit for both.

  Possible values: `outbound`, `inbound`
- `status` (array): Keep only messages whose current `status` matches; repeat the parameter to match any of several. One of `scheduled`, `accepted`, `sent`, `delivered`, `undelivered`, `failed`, `rejected`, `canceled`, `expired`, or `received`. `scheduled` and `canceled` are accepted but match nothing until send-later scheduling ships.
- `error_code` (array): Keep only messages whose failure reason (`last_error.code`) matches; repeat the parameter to match any of several. One of `invalid_destination`, `unreachable`, `blocked_by_carrier`, `blocked_by_fraud_protection`, `blocked_by_recipient`, `landline_unreachable`, `content_rejected`, `sender_unregistered`, `recipient_opted_out`, `provider_unavailable`, `insufficient_balance`, or `unknown`.
- `category` (string)

  Filter by category.

  Possible values: `transactional`, `marketing`, `authentication`, `service`
- `to` (string): Filter by recipient phone number (E.164 exact match).
- `from` (string): Filter by sender (E.164, alphanumeric, or short code; exact match).
- `tag` (array): Filter by tag. Accepts `name` to match any record carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A record must match every tag listed to be returned.

## Response body

- `data` (array of object, required): Page of SMS messages, newest first.
- `data.id` (string, required): ID of the message, assigned when the send is accepted. Pass it as `message_id` to the get-message endpoint.
- `data.direction` (string, required)

  Whether the message was sent from a Bird sender (`outbound`) or received from a subscriber (`inbound`).

  Possible values: `outbound`, `inbound`
- `data.status` (string, required)
- `data.to` (string, required): Where the message went. On an outbound message this is the recipient's phone number in E.164 format; on an inbound one it is your own number that received it.
- `data.from` (string, required): Where the message came from. On an outbound message this is the sender you sent it from: an E.164 number, an alphanumeric sender ID, or a short code. On an inbound message, this is the phone number that sent it to you.
- `data.text` (string): The message body. Every message carries body text, attachments, or both, so this is absent only on a received message that carried attachments and no text. For a template send, this is the rendered text after parameter substitution. When `category` is `authentication` (a message carrying a one-time code), this is `**REDACTED**`: the code still reaches the recipient, but the API does not retain it for later reads.
- `data.category` (nullable string): Content classification supplied for free text or derived from the template. Null for inbound messages.
- `data.requested_language` (nullable string, required): The template language requested by the send, in canonical form. Null when the send named no language or used no template.
- `data.resolved_language` (nullable string, required): The template language whose text was rendered, in canonical form. Null when the send used no template. This can differ from `requested_language` when the template's fallback policy selects another language.
- `data.template_id` (nullable string, required): The template rendered for this message, or null for a free-text message.
- `data.template_version_id` (nullable string, required): The workspace published version or synthetic built-in version rendered at acceptance, or null for a free-text message. For a built-in template, `template_content_hash` identifies the exact catalogue source.
- `data.template_content_hash` (nullable string, required): The rendered language's source fingerprint, or null for a free-text message.
- `data.segments` (object, required): Segment breakdown for the body.
- `data.segments.count` (integer, required): Number of segments the body is split into. Each segment is a billable unit.
- `data.segments.encoding` (string, required)

  Encoding used for the body. The `GSM_7BIT` encoding fits 160 septets
  (seven-bit units) in one segment, or 153 per part in a multi-segment
  message. The `UCS2` encoding applies when the body contains a character
  outside the GSM 03.38 alphabet, including emoji, CJK, and some accented
  characters. It fits 70 UTF-16 code units in one segment, or 67 per part.

  Neither limit counts characters, and both alphabets have characters that
  cost two units. Under `GSM_7BIT` there are ten such entries, and they are
  the whole set: `^`, `{`, `}`, `\`, `[`, `]`, `~`, `|`, `€`, and the form
  feed control. Eighty of those fill a single segment. Under `UCS2` an emoji
  outside the Basic Multilingual Plane is a surrogate pair costing two code
  units, so 35 of those fill a single segment.

  Possible values: `GSM_7BIT`, `UCS2`
- `data.segments.characters` (integer, required): Character count of the body, counted in Unicode code points under either encoding. This is not the segment measure: a `GSM_7BIT` extended-table character counts once here but costs two septets, and a `UCS2` emoji outside the Basic Multilingual Plane counts once here but costs two of the segment's 70 code units.
- `data.cost` (nullable object): What the message cost, split into Bird's charge and any third-party fees passed through. Null until the message has been priced.
- `data.cost.amount` (string, required): Total charged, as a decimal string: the sum of the components below. Net of tax, which applies to your wallet balance rather than to an individual charge.
- `data.cost.currency_code` (string, required): ISO 4217 currency code. Every component is denominated in this currency.
- `data.cost.transaction_amount` (nullable string, required): What we charged to carry the message, as a decimal string. `null` when this component was not priced; `"0.00000"` when it priced at zero.
- `data.cost.passthrough_amount` (nullable string, required): Third-party fees we pass on, as a decimal string, such as US 10DLC carrier surcharges. `null` when this component was not priced; `"0.00000"` when it priced at zero.
- `data.tags` (array of object): Structured `{name, value}` filter labels applied to this message.
- `data.tags.name` (string, required): Tag name. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 32 characters.
- `data.tags.value` (string, required): Tag value. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 64 characters.
- `data.metadata` (object): Arbitrary JSON metadata stored on the message and echoed in webhook payloads.
- `data.options` (object): The settings applied to this message, with any option you omitted filled in with the default in force when you sent it. Absent on inbound messages, and on any outbound message for which no settings were recorded.
- `data.options.smart_encoding` (boolean, required): Whether Bird replaced characters outside the GSM-7 alphabet in this message's body with their closest equivalent before sending it. When `true`, `text` is the body as sent and `segments` describes that body.
- `data.validity_period` (integer): Preview feature: how long, in seconds, the carrier may keep attempting delivery before the message is marked `expired`. Not returned yet.
- `data.carrier` (string): Carrier that handled the message. Absent until a delivery receipt identifies it, and on a received message the carrier reports it only where a carrier fee applies.
- `data.mcc_mnc` (string): Mobile country code and mobile network code of the carrier. Absent until the carrier is identified.
- `data.last_error` (nullable object): Failure detail on a message that failed, was rejected, was not delivered, or expired. Absent otherwise.
- `data.last_error.code` (string, required)

  Standardized failure reason:

  - `invalid_destination`: The number is unassigned, ported out, or malformed.
  - `unreachable`: The handset is off or outside coverage.
  - `blocked_by_carrier`: The carrier filtered the message.
  - `blocked_by_fraud_protection`: Bird fraud protection blocked suspected SMS pumping.
  - `blocked_by_recipient`: The recipient device blocked the sender.
  - `landline_unreachable`: The destination is a landline that does not accept SMS.
  - `content_rejected`: The carrier rejected the content.
  - `sender_unregistered`: The sender is not registered for the destination.
  - `recipient_opted_out`: The recipient is on a suppression list.
  - `provider_unavailable`: The provider remained unavailable after retries.
  - `insufficient_balance`: The workspace wallet could not fund the send.
  - `unknown`: The failure could not be classified.

  This is an open enum. Accept unrecognized values.

  Possible values (may grow over time): `invalid_destination`, `unreachable`, `blocked_by_carrier`, `blocked_by_fraud_protection`, `blocked_by_recipient`, `landline_unreachable`, `content_rejected`, `sender_unregistered`, `recipient_opted_out`, `provider_unavailable`, `insufficient_balance`, `unknown`
- `data.last_error.description` (string, required): The failure in words: the provider's reason text, or Bird's explanation for a fraud protection block or a message refused before submission. Free-form, so branch on `code` and show this to a human.
- `data.last_error.carrier_error_code` (nullable string): Raw provider-supplied error code, finer-grained than the `code` that normalizes it. Not a Bird-defined value, so quote it to support when asking why a message failed. Null when the provider sent none, including any failure decided before one was reached.
- `data.last_error.occurred_at` (string, required): When the failure occurred.
- `data.created_at` (string, required): When the message was accepted (outbound) or received (inbound).
- `data.sent_at` (nullable string): When the message was handed to the carrier. Null until then.
- `data.delivered_at` (nullable string): When delivery was confirmed. Null until then.
- `next_cursor` (nullable string, required): Cursor for the next page. Pass back as `starting_after` to advance forward. `null` when no next page exists.
- `prev_cursor` (nullable string, required): Cursor for the previous page. Pass back as `ending_before` to step backward. `null` when no previous page exists.
- `refresh_cursor` (nullable string, required): Refresh anchor, the first row of this response. Pass back as `ending_before` to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-`null` whenever `data` is non-empty; `null` only on an empty page. Distinct from `prev_cursor`.

## Related resources

- [Sending your first SMS](/learn/sms/sending-your-first-sms) (video)
- [What does SMS mean?](/explained/sms/what-does-sms-mean) (answer)
- [SMS](/sms-api) (product)
- [Build your first integration](/learn/paths/integration) (course)

[Get an implementation brief](/learn/workspace?topic=sms)
