---
title: "Search SMS"
method: GET
path: "/sms"
tags: ["SMS"]
---

# Search SMS

`GET /sms`

Search for your SMS messages.

## Query parameters

- `direction` 'inbound' | 'outbound', required — The direction. Inbound is a call or an SMS received by the Callr platform. Outbound is a call or an SMS initiated by the Callr platform.
- `from` union — The SMS sender. If empty, a value will be automatically set depending on the destination. Otherwise, the sender must be either a dedicated shortcode, or an alphanumeric sender (with at least one character - 11 chars maximum). Custom SMS senders must be approved by our team and downstream carriers. You can request a custom sender on https://app.callr.com.
  - string
  - string — A phone number in ITU-T E.164 format https://en.wikipedia.org/wiki/E.164, prefixed by "+"
- `to` string — A phone number in ITU-T E.164 format https://en.wikipedia.org/wiki/E.164, prefixed by "+"
- `contains` string
- `trafficType` 'marketing' | 'alerting' — Traffic type of an SMS message. Carriers require this to be set to either `marketing` or `alerting`.
- `status` 'created' | 'error' | 'expired' | 'failed' | 'pending' | 'delivered' | 'remote-queued' | 'sent' — The status of the SMS. `created` = The SMS has been created. `error` = The SMS has an error. `expired` = The SMS has expired. `failed` = The SMS has failed. `pending` = The SMS is waiting to be sent on our side. `delivered` = The SMS has been delivered to the recipient. `remote-queued` = The SMS is queued on the remote side. `sent` = The SMS has been sent.
- `createdAfter` string, date-time, required — RFC 3339, section 5.6
- `createdBefore` string, date-time, required — RFC 3339, section 5.6
- `sort` 'created' | 'updated'
- `order` 'asc' | 'desc'
- `offset` integer — Offset index (zero-based)
- `limit` integer — Limit search results

## Response `200`

Search results

- SMSSearchResult
  - `offset` integer, required — Offset index (zero-based)
  - `total` integer, required
  - `hasMore` boolean, required — Whether there are more results available
  - `hits` SMS[], required
    - `direction` 'inbound' | 'outbound', required — The direction. Inbound is a call or an SMS received by the Callr platform. Outbound is a call or an SMS initiated by the Callr platform.
    - `sid` string, required — Short ID
    - `from` union, required — The SMS sender. If empty, a value will be automatically set depending on the destination. Otherwise, the sender must be either a dedicated shortcode, or an alphanumeric sender (with at least one character - 11 chars maximum). Custom SMS senders must be approved by our team and downstream carriers. You can request a custom sender on https://app.callr.com.
      - string
      - string — A phone number in ITU-T E.164 format https://en.wikipedia.org/wiki/E.164, prefixed by "+"
    - `to` string, required — A phone number in ITU-T E.164 format https://en.wikipedia.org/wiki/E.164, prefixed by "+"
    - `body` SMSBody, required — SMS body
      - `text` string, required
    - `trafficType` 'marketing' | 'alerting', required — Traffic type of an SMS message. Carriers require this to be set to either `marketing` or `alerting`.
    - `status` 'created' | 'error' | 'expired' | 'failed' | 'pending' | 'delivered' | 'remote-queued' | 'sent', required — The status of the SMS. `created` = The SMS has been created. `error` = The SMS has an error. `expired` = The SMS has expired. `failed` = The SMS has failed. `pending` = The SMS is waiting to be sent on our side. `delivered` = The SMS has been delivered to the recipient. `remote-queued` = The SMS is queued on the remote side. `sent` = The SMS has been sent.
    - `error` string — An error message, when applicable
    - `created` string, date-time, required — RFC 3339, section 5.6
    - `delivered` string, date-time — RFC 3339, section 5.6
    - `updated` string, date-time, required — RFC 3339, section 5.6
    - `sent` string, date-time — RFC 3339, section 5.6
    - `parts` integer, required — The parts of the message
    - `network` string — ITU-T E.212 MCC MNC network
    - `encoding` 'gsm' | 'unicode', required — By default, we automatically detect the encoding based on the characters used in the message. If you want to force the encoding, you can use this field. The SMS body will be processed according to the encoding specified. Depending on the encoding, messages may be split into parts of 153 (GSM 03.38) or 67 (UNICODE) characters. Please note that some countries only support GSM encoding.
    - `cost` string, required — Amount in cents
    - `paymentType` 'postpaid' | 'prepaid', required — Either prepaid or postpaid
    - `statusHistory` SMSStatusHistory[]
      - `after` 'created' | 'error' | 'expired' | 'failed' | 'pending' | 'delivered' | 'remote-queued' | 'sent', required — The status of the SMS. `created` = The SMS has been created. `error` = The SMS has an error. `expired` = The SMS has expired. `failed` = The SMS has failed. `pending` = The SMS is waiting to be sent on our side. `delivered` = The SMS has been delivered to the recipient. `remote-queued` = The SMS is queued on the remote side. `sent` = The SMS has been sent.
      - `before` 'created' | 'error' | 'expired' | 'failed' | 'pending' | 'delivered' | 'remote-queued' | 'sent', required — The status of the SMS. `created` = The SMS has been created. `error` = The SMS has an error. `expired` = The SMS has expired. `failed` = The SMS has failed. `pending` = The SMS is waiting to be sent on our side. `delivered` = The SMS has been delivered to the recipient. `remote-queued` = The SMS is queued on the remote side. `sent` = The SMS has been sent.
      - `at` string, date-time, required — RFC 3339, section 5.6

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `405` — Method Not Allowed
- `429` — Too Many Requests (rate limit exceeded)
- `500` — Internal Server Error

---

[API](https://skmtc.net/callr/apis/callr-rest-api-v2-0.md) · [All operations](https://skmtc.net/callr/apis/callr-rest-api-v2-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/callr/callr-rest-api-v2-0/versions/76d36d004a8f/schema)
