Skip to main content

What are custom headers?

Custom headers let you attach RFC 5322 compliant headers to your messages. This is useful for message classification, tracking, and per-recipient identifiers.
Some headers are restricted to prevent abuse, and MailChannels may limit how many times the same header can be repeated. See Restricted headers for a non-exhaustive list.

Adding custom headers

Include custom headers in the top-level headers object to apply them to every recipient of the message:
Using custom headers incorrectly could significantly harm your email deliverability.

Custom headers within personalizations

Custom headers can also be added to individual personalizations, allowing for recipient-specific headers. This is useful for personalized unsubscribe links, tracking, or identification headers that vary per recipient.
When a header is defined both globally and in a personalization object, the value in the personalization object is used.

Restricted headers

The following names cannot be used as keys in the headers JSON object. This list is non-exhaustive.
  • Authentication-Results
  • BCC
  • CC
  • Content-Transfer-Encoding
  • Content-Type
  • DKIM-Signature
  • From
  • Message-ID
  • Received
  • Reply-To
  • Subject
  • To