# 21652: Maximum subject length is 40 characters

Log Level: ERROR

## Description

Use a subject that is 40 characters or fewer. Twilio returns this error when the subject text in your message exceeds that limit.

### Possible causes

* The subject line you sent is longer than 40 characters.
* Dynamic text pushed the final subject over the limit after your application built the message request.

### Possible solutions

* Shorten the subject to 40 characters or fewer before you send the message.
* Review the final rendered subject in your application and trim or abbreviate any text that makes it exceed the limit.

#### Additional resources

* [Messages resource](/docs/messaging/api/message-resource)
