21617: The concatenated message body exceeds the 1600 character limit
MESSAGING
ERROR
You tried to send or receive a Programmable Messaging message whose body is longer than the supported limit. The Body parameter for an outgoing message can be up to 1,600 characters. For SMS, characters outside GSM-7, such as emoji, smart quotes, or other Unicode characters, can use more space than standard GSM characters and cause the message to exceed the limit sooner than expected.
- Your application sent a
Bodyvalue longer than 1,600 characters. - Your TwiML response included
<Message>or<Body>text longer than the supported limit. - The message contains emoji, smart punctuation, accented characters, or other non-
GSM-7characters that increase the encoded length. Use the Message Segment Calculator to preview how a given body is encoded and segmented. - Your application concatenated multiple strings or template values into a final message body that exceeded the limit.
- An inbound message to your Twilio number exceeded the supported body length.
- Shorten the message body so the final payload stays within the supported limit.
- Validate the fully rendered
Bodyin your application before you send the request. Check the final text after template variables, personalization, or concatenation are applied. - Review the message for non-
GSM-7characters such as emoji, smart quotes, long dashes, or non-Latin characters. Replace them where possible to reduce encoded length. - If you use a Messaging Service for SMS, enable Smart Encoding to replace certain Unicode punctuation with GSM-compatible characters.
- For long SMS text, consider whether
send_as_mmsis appropriate for your use case and destination. - Keep SMS content concise. For the best deliverability and user experience, keep SMS messages under 320 characters when possible.
- Messages resource
- Message Segment Calculator - preview encoding, segment count, and the impact of non-
GSM-7characters for a given message body - How long can a message be?
- Messaging Services