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:
| Encoding | Used when | One segment | Each segment of a longer message |
|---|---|---|---|
GSM-7 | Only standard characters: letters, digits and common punctuation | 160 characters | 153 characters |
UCS-2 | Any other character, such as emoji or curly quotes | 70 characters | 67 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" }
}