Skip to main content

Request Parameters

Marketing Email​

Body Parameters​

FieldTypeRequiredDescription
fromAddressYesSender's email address and name
replyToAddressNoReply-to email address and name
toAddress[]YesList of primary recipients
ccAddress[]NoList of CC recipients
bccAddress[]NoList of BCC recipients
subjectstringYesEmail subject line
htmlstringYes (html or text)HTML email content
textstringYes (html or text)Plain text email content
attachmentsAttachment[]NoList of file attachments
customerReferencestringNoYour reference for tracking
inReplyTostringNoMessage-ID of the email being replied to. Enables threading in email clients.
headersobjectNoCustom key-value email headers to include in the outbound message. Check Custom Headers section below.

Objects​

Address​

FieldTypeRequiredDescription
emailstringYesEmail address
namestringNo (Required for From object)Display name

Attachment​

FieldTypeRequiredDescription
fileNamestringYesName of the file with extension. Max 255 characters. Must not contain control characters, a forward slash (/) or characters that reverse the text direction.
contentstringYesBase64 encoded file content. Must not be empty ("File is empty").
contentTypestringYesMIME type of the file. Max 255 characters, standard printable characters only. It is not checked against the file content.
contentIdstringNoContent ID for inline images. Max 255 characters, no spaces or control characters ("Invalid content id for file").

Supported File Types​

Any file type is accepted, the same way incoming email is. Replying to an email that came with an uncommon attachment (for example .mp4 or .heic) is not rejected.

Executable files are blocked. Windows (.exe, .dll) and Linux executable programs are rejected, whatever name or content type they are given.

A contentType that does not match the file content (for example application/pdf on a file that is not a PDF) is accepted.

Images embedded in the HTML body​

An image written as <img src='data:image/...;base64,...'> (single quotes) in the HTML body is converted to an inline attachment and goes through the same checks as any other attachment. Invalid base64 data is rejected with an error, and if the HTML body cannot be processed in time the request is rejected with "The HTML body could not be processed." Images embedded in other ways are left as they are and are not checked.

Custom Headers​

Custom headers let you attach metadata to outgoing emails that email clients and servers can act on — without it appearing in the message body. A few common uses:

  • Prevent Gmail from threading unrelated emails together using X-Entity-Ref-ID
  • Add a one-click unsubscribe shortcut with List-Unsubscribe
  • Pass internal tracking references like campaign or order IDs

The headers field accepts a flat key-value JSON object:

"headers": {
"X-Campaign-ID": "promo-2026",
"X-Client-Reference": "order-12345"
}
headers:
X-Campaign-ID: "promo-2026"
X-Client-Reference: "order-12345"
RuleDetail
FormatJSON object {"key": "value"} — not an array
Maximum entries20 headers
Name formatLetters, digits, and hyphens only. Must start and end with a letter or digit (e.g. X-Custom-Header)
Value formatPrintable ASCII characters only. Max 998 characters
Reserved headersSystem headers (From, To, Bcc, Subject, Message-ID, DKIM-Signature, etc.) cannot be overridden

Requests that violate these rules are rejected with a 400 Bad Request error.

info

If you set In-Reply-To through custom headers, you must also provide the References header alongside it — email clients rely on both headers to thread the message correctly. For most cases, prefer the dedicated inReplyTo field.

Email Threading (inReplyTo)​

Use inReplyTo to thread outbound emails into existing conversations in recipients' email clients.

Finding the Message-ID of the original email​

The Message-ID of an outbound email includes a timestamp, the message UUID, and the sending domain:

Message-ID: <20260617052825.68047ebb-f07f-48bb-a504-f4dc42d073c1@yourdomain.com>

To get this value, view the raw source of the email in your client. In Gmail: open the email, click the three-dot menu, and select Show original.

First-level reply​

{
"subject": "Re: Your inquiry",
"inReplyTo": "<20260617052825.68047ebb-f07f-48bb-a504-f4dc42d073c1@yourdomain.com>"
}
subject: "Re: Your inquiry"
inReplyTo: "<20260617052825.68047ebb-f07f-48bb-a504-f4dc42d073c1@yourdomain.com>"

Transactional Email​

Query Parameters​

ParameterTypeRequiredDescription
prioritystringYes"low" or "high"
PriorityDescriptionUse Cases
highTime-sensitive, critical emailsPassword resets, OTP, urgent alerts
lowStandard transactional emailsOrder confirmations, receipts

Body Parameters​

FieldTypeRequiredDescription
fromAddressYesSender's email address and name
replyToAddressNoReply-to email address and name
toAddress[]YesList of primary recipients
ccAddress[]NoList of CC recipients
bccAddress[]NoList of BCC recipients
subjectstringYesEmail subject line
htmlstringYes (html or text)HTML email content
textstringYes (html or text)Plain text email content
attachmentsAttachment[]NoList of file attachments
customerReferencestringNoYour reference for tracking
inReplyTostringNoMessage-ID of the email being replied to. Enables threading in email clients.
headersobjectNoCustom key-value email headers to include in the outbound message. Check Custom Headers section below.

Objects​

Address​

FieldTypeRequiredDescription
emailstringYesEmail address
namestringNo (Required for From object)Display name

Attachment​

FieldTypeRequiredDescription
fileNamestringYesName of the file with extension. Max 255 characters. Must not contain control characters, a forward slash (/) or characters that reverse the text direction.
contentstringYesBase64 encoded file content. Must not be empty ("File is empty").
contentTypestringYesMIME type of the file. Max 255 characters, standard printable characters only. It is not checked against the file content.
contentIdstringNoContent ID for inline images. Max 255 characters, no spaces or control characters ("Invalid content id for file").

Supported File Types​

Any file type is accepted, the same way incoming email is. Replying to an email that came with an uncommon attachment (for example .mp4 or .heic) is not rejected.

Executable files are blocked. Windows (.exe, .dll) and Linux executable programs are rejected, whatever name or content type they are given.

A contentType that does not match the file content (for example application/pdf on a file that is not a PDF) is accepted.

Images embedded in the HTML body​

An image written as <img src='data:image/...;base64,...'> (single quotes) in the HTML body is converted to an inline attachment and goes through the same checks as any other attachment. Invalid base64 data is rejected with an error, and if the HTML body cannot be processed in time the request is rejected with "The HTML body could not be processed." Images embedded in other ways are left as they are and are not checked.

Custom Headers​

Custom headers let you attach metadata to outgoing emails that email clients and servers can act on — without it appearing in the message body. A few common uses:

  • Prevent Gmail from threading unrelated emails together using X-Entity-Ref-ID
  • Add a one-click unsubscribe shortcut with List-Unsubscribe
  • Pass internal tracking references like campaign or order IDs

The headers field accepts a flat key-value JSON object:

"headers": {
"X-Campaign-ID": "promo-2026",
"X-Client-Reference": "order-12345"
}
headers:
X-Campaign-ID: "promo-2026"
X-Client-Reference: "order-12345"
RuleDetail
FormatJSON object {"key": "value"} — not an array
Maximum entries20 headers
Name formatLetters, digits, and hyphens only. Must start and end with a letter or digit (e.g. X-Custom-Header)
Value formatPrintable ASCII characters only. Max 998 characters
Reserved headersSystem headers (From, To, Bcc, Subject, Message-ID, DKIM-Signature, etc.) cannot be overridden

Requests that violate these rules are rejected with a 400 Bad Request error.

info

If you set In-Reply-To through custom headers, you must also provide the References header alongside it — email clients rely on both headers to thread the message correctly. For most cases, prefer the dedicated inReplyTo field.

Email Threading (inReplyTo)​

Use inReplyTo to thread outbound emails into existing conversations in recipients' email clients.

Finding the Message-ID of the original email​

The Message-ID of an outbound email includes a timestamp, the message UUID, and the sending domain:

Message-ID: <20260617052825.68047ebb-f07f-48bb-a504-f4dc42d073c1@yourdomain.com>

To get this value, view the raw source of the email in your client. In Gmail: open the email, click the three-dot menu, and select Show original.

First-level reply​

{
"subject": "Re: Your inquiry",
"inReplyTo": "<20260617052825.68047ebb-f07f-48bb-a504-f4dc42d073c1@yourdomain.com>"
}
subject: "Re: Your inquiry"
inReplyTo: "<20260617052825.68047ebb-f07f-48bb-a504-f4dc42d073c1@yourdomain.com>"