v1

latestOpenAPI 3.1.1Proprietary2026-07-245895107.9 KB
SMS

Send SMS

Send an SMS. If accepted, the SMS will cycle through the following statuses:

  • created
  • pending
  • sent
  • remote-queued
  • delivered

At any time, the SMS can be in the following statuses:

  • error: was not accepted
  • failed: rejected by the carrier
  • expired: was not delivered to the recipient
post/sms

Query parameters

tostring required

A phone number in ITU-T E.164 format https://en.wikipedia.org/wiki/E.164, prefixed by "+"

Example:+33199001234

SMS recipient

string
OR
string

A phone number in ITU-T E.164 format https://en.wikipedia.org/wiki/E.164, prefixed by "+"

Example:+33199001234

The SMS sender. If empty, a value will be automatically set depending on the destination. Otherwise, the sender must be either a phone number, 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.

encoding'gsm' | 'unicode'

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.

Example:gsm

By default, we automatically detect the encoding based on the characters used in the body. 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.

trafficType'marketing' | 'alerting'

Traffic type of an SMS message. Carriers require this to be set to either marketing or alerting.

Example:marketing

Traffic type of an SMS message. Carriers require this to be set to either marketing or alerting.

Request body

textstring required

Example request

{
  "text": "Hello world!"
}

Response

SMS accepted

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.

sidstring required

Short ID

tostring required

A phone number in ITU-T E.164 format https://en.wikipedia.org/wiki/E.164, prefixed by "+"

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.

errorstring

An error message, when applicable

createdstring date-time required

RFC 3339, section 5.6

deliveredstring date-time

RFC 3339, section 5.6

updatedstring date-time required

RFC 3339, section 5.6

sentstring date-time

RFC 3339, section 5.6

partsinteger required

The parts of the message

networkstring

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.

coststring required

Amount in cents

paymentType'postpaid' | 'prepaid' required

Either prepaid or postpaid

Example response

{
  "direction": "inbound",
  "sid": "callrsid",
  "from": "+33199001234",
  "to": "+33199001234",
  "body": {
    "text": "Hello world!"
  },
  "trafficType": "marketing",
  "status": "sent",
  "created": "2024-04-24T17:42:28Z",
  "delivered": "2024-04-24T17:42:28Z",
  "updated": "2024-04-24T17:42:28Z",
  "sent": "2024-04-24T17:42:28Z",
  "parts": 10,
  "network": "20801",
  "encoding": "gsm",
  "cost": "5.50",
  "paymentType": "prepaid",
  "statusHistory": [
    {
      "after": "sent",
      "before": "sent",
      "at": "2024-04-24T17:42:28Z"
    }
  ]
}