Skip to main content
POST
Send email

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

idempotency-key
string

Optional. Unique key (e.g. UUID) that makes retries safe: a repeat with the same key within 24 hours returns the original message instead of sending again. Generated server-side when omitted.

Path Parameters

id
string
required

Body

to
required

One email address, a comma-separated list, or an ordered array of addresses. Every To recipient is visible to the others.

body
string
required

Email body. Plain text or HTML — HTML is auto-detected and rendered, with a plain-text fallback generated automatically.

Required string length: 1 - 100000
subject
string

Required for new threads. Optional when threadId is set — the thread subject is used automatically (with Re: prefix).

Required string length: 1 - 998
bodyHtml
string

Provide only when the plain-text and HTML versions must differ. Omit for normal sends — put HTML in body instead.

Maximum string length: 500000
threadId
string

Thread ID for replies

includeQuote
boolean

When replying with threadId, append a quoted copy of the previous message to the body. Defaults to true. Set false to send only your reply text.

replyTo
string<email>

Optional. Address that replies should be routed to (set as the Reply-To MIME header). Free plan: must be the address of an inbox you own in OpenMail. Pro plan or higher: any valid email address.

cc
string<email>[]

Optional CC recipients. Visible to every recipient.

unsubscribe
boolean

Optional. Adds one-click List-Unsubscribe headers (RFC 8058), so Gmail, Yahoo and Apple Mail show a native unsubscribe button. Any {{unsubscribe_url}} in body or bodyHtml is replaced with the same link. A recipient who unsubscribes is suppressed for your whole organisation, and later sends to them, including replies, return 422 recipient_suppressed with type unsub. Requires exactly one recipient across To, Cc and Bcc. A body containing {{unsubscribe_url}} without this flag is rejected.

On shared OpenMail domains this is automatic for any email to a single recipient (no cc or bcc) who is not another OpenMail inbox and has not written to you on the thread. It can't be turned off there; use a custom domain for full control.

bcc
string<email>[]

Optional BCC recipients. Delivered, but omitted from the message To and Cc recipients can read. Use this for CRM logging addresses (for example HubSpot or Salesforce) that only record the email when they are in BCC. Checked against the inbox's outbound recipient policy, same as to and cc.

sendAt
string<date-time>

Optional ISO-8601 time to send this email, at least 30 seconds ahead and within 30 days. Omit to send immediately. Rate limits, recipient policy and content checks run when it sends, not when it is scheduled. The response is 202 with status scheduled. Cancel or move it with the scheduled-sends routes. The same Idempotency-Key returns the scheduled email until it goes out, then the sent message.

headers
object

Optional custom headers, as header name to string value, for example {"List-Unsubscribe": "<https://example.com/u/123>"} or {"X-Campaign": "spring"}. Up to 20 headers and 8 KB in total; each name plus value must fit in 996 characters. Values can't contain line breaks. Headers that would change the sender, recipients, threading or authentication are rejected: From, Sender, To, Cc, Bcc, Subject, Date, Message-ID, In-Reply-To, References, Reply-To, Return-Path, MIME-Version, DKIM-Signature, Received, Authentication-Results, ARC-*, Feedback-ID, Delivered-To, X-Original-To, and anything starting with Content-, X-SES-, X-Mailgun- or X-OpenMail-. Use the matching field instead. Can't set List-Unsubscribe when unsubscribe is true, or at all on a shared OpenMail domain.

Response

Email sent (or idempotent replay of a send that already went out)

Email sent (or idempotent replay of a send that already went out)

messageId
string
threadId
string
providerMessageId
string
status
enum<string>
Available options:
pending,
sent,
delivered,
failed