---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/21617#article
headline: "21617: The concatenated message body exceeds the 1600 character limit"
url: https://www.twilio.com/docs/api/errors/21617
inLanguage: en
dateModified: 2026-07-08T18:10:04.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 21617: The concatenated message body exceeds the 1600 character limit

Log Type: APPLICATION

Log Level: ERROR

## Description

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.

### Possible causes

* Your application sent a `Body` value 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-7` characters that increase the encoded length. Use the [Message Segment
  Calculator](https://twiliodeved.github.io/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 of 1,600 characters.

### Possible solutions

* Shorten the message body so the final payload stays within the supported limit.
* Validate the fully rendered `Body` in 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-7` characters 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_mms` is 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.

#### Additional resources

* [Messages resource](/docs/messaging/api/message-resource)
* [Message Segment Calculator](https://twiliodeved.github.io/message-segment-calculator/) - preview encoding, segment count, and the impact of non-`GSM-7` characters for a given message body
* [How long can a message be?](/docs/glossary/what-sms-character-limit)
* [Messaging Services](/docs/messaging/services)
