Skip to main content
Use the headers object to attach custom email headers to a message. Custom headers are useful for correlation IDs, internal workflow metadata, and provider-supported routing hints.

Add custom headers

Requirements

A message can include up to 100 custom headers. Header names cannot be empty, and neither names nor values may contain carriage returns or line feeds. The headers value must be a JSON object whose values are strings. Dugble rejects the entire send request when a custom header is invalid.
Do not put secrets or sensitive personal data in headers. Email headers may be retained by providers and receiving mail systems.

Use stable names

Use clear application-specific names so logs and downstream systems remain easy to understand:
Do not use custom headers to replace normal message fields such as From, To, Subject, or Reply-To. Set those through the corresponding API fields.

Batch sends

Custom headers are supported on each message in a batch: