Segments and encoding

How message length affects cost.

SMS messages are sent in segments. You are charged for each segment, for each recipient.

Encoding

The characters in your message decide its encoding:

EncodingUsed whenOne segmentEach segment of a longer message
GSM-7Only standard characters: letters, digits and common punctuation160 characters153 characters
UCS-2Any other character, such as emoji or curly quotes70 characters67 characters

A single emoji or special character switches the whole message to UCS-2, which more than doubles the number of segments. Some GSM-7 characters, such as { } [ ] ~ \ | € ^, count as two.

Limits

A message can contain at most 480 Unicode characters (code points), including spaces. Longer messages are rejected with message_too_long. SMS encoding still determines the number of billable segments; GSM extension characters and emoji can use more than one encoding unit.

Check before you send

POST /messages/estimate shows the encoding, number of characters, segments and cost of a message without sending it:

{
  "encoding": "GSM-7",
  "characters": 31,
  "segments": 1,
  "recipients": 250,
  "costPerMessage": { "amount": "0.04", "currency": "GHS" },
  "totalCost": { "amount": "10.00", "currency": "GHS" }
}

On this page