---
url: /errors/email_message_invalid_subject.md
---
# `email_message_invalid_subject`

`email_message_invalid_subject`

## Description

The queued email subject exceeds the maximum length accepted by the email message entity.

## HTTP Status

`400 Bad Request`

## `doc_url` Format

The `doc_url` value is an absolute URL and changes by environment:

`<docs-base-url>/errors/email_message_invalid_subject`

## Typical Causes

* The subject is longer than 255 characters.

## Example

Request:

```http
POST /v1/emailing/messages
Content-Type: application/json

{
  "from": "hello@quarzo-life.com",
  "to": "test@quarzo-life.com",
  "subject": "<subject over 255 chars>",
  "content": {
    "template_name": "forgot_password",
    "variables": {
      "resetLink": "https://quarzo-life.com/reset?token=abc"
    }
  }
}
```

Response:

```json
{
  "errors": [
    {
      "code": "email_message_invalid_subject",
      "message": "The provided subject is invalid.",
      "doc_url": "https://docs.example.com/errors/email_message_invalid_subject"
    }
  ]
}
```

## How To Fix

1. Shorten the subject to 255 characters or fewer.
2. Retry the request.
