Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this pageProducts used
Looking for more inspiration?Visit the
Error
Application error

21605: Maximum body length is 160 characters (old API endpoint)

Twilio Messaging DocumentationMessaging

Description

description page anchor

You receive this error when you send a request to the legacy /SMS/Messages endpoint with a message body longer than 160 characters. If you need to send longer text, use the /Messages endpoint instead. The current Messages resource accepts body values up to 1,600 characters, and SMS content longer than one segment is segmented and billed accordingly.

Possible causes

possible-causes page anchor
  • Your application is still sending outbound requests to the legacy /SMS/Messages endpoint.
  • The message body in the request is longer than 160 characters.
  • Your message content is better suited for the current Messages resource, which supports longer SMS bodies and segmented delivery.
  • Reduce the message body to 160 characters or fewer if you must keep the legacy endpoint during a migration.
  • Update your integration to send outbound messages with the /Messages endpoint instead of /SMS/Messages.
  • Review your SMS content for Unicode characters such as emoji or smart quotes, since encoding affects segment size and message cost when you send long messages through the current endpoint.
  • If you regularly send longer text, design for segmented SMS or consider send_as_mms when that delivery model fits your use case.

Additional resources

additional-resources page anchor