Property headers

The ResponsiveEmail API supports many predefined properties to set MIME headers. These include properties like subject, to and reply-to. But if you want to set other headers in the header too, maybe even unofficial headers, you can do so by using the headers property.


To add a single 'x-my-header' to the MIME of your responsive email, you may include a headers property in the input JSON.

    "from"    : "",
    "subject" : "This is the subject line",
    "headers" : {
        "x-my-header" : "my-value"

All the headers are directly copied from the input JSON into the responsive email, without any validation.


If you use your own headers, we strongly advise to prefix your headers with x-, as we have shown in the example above. Prefixing with x- is the official way to prevent that your custom headers conflict with current or future official email headers.

The headers property should be used for setting custom headers. For the normal headers, better use one of the predefined properties, like subject, from, replyTo, to, cc and bcc.

Found a typo?

You can find this documentation page on GitHub.
Propose a change