---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/21658#article
headline: "21658: Parameter exceeded character limit"
url: https://www.twilio.com/docs/api/errors/21658
inLanguage: en
dateModified: 2026-04-17T11:01:11.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 21658: Parameter exceeded character limit

Log Type: APPLICATION

Log Level: ERROR

## Description

You receive this error when a Messaging API request includes a parameter value that is longer than the allowed limit. In a Message request, `Body` can be up to 1,600 characters. When you send a Content template, each variable value can be up to 1,600 characters, though some template fields enforce a lower limit and the variable limit follows that field limit.

### Possible causes

* Your `Body` value is longer than 1,600 characters.
* A value in `ContentVariables` is longer than the allowed limit for the template field where it is used. Variable values can be up to 1,600 characters, and some fields have lower maximums.
* Another Messaging request parameter exceeded its maximum character limit.

### Possible solutions

* Shorten the parameter that caused the request to fail, then send the request again.
* If you are sending text in `Body`, keep it at 1,600 characters or fewer.
* If you are using `ContentSid` and `ContentVariables`, shorten each variable value so it fits the limit for the template field where you use it.

#### Additional resources

* [Messages resource](/docs/messaging/api/message-resource)
* [Using Variables with Content Templates](/docs/content/using-variables-with-content-api)
* [How long can a message be?](/docs/glossary/what-sms-character-limit)
