messages

Send email

Send an email from an inbox. Optionally pass an Idempotency-Key header to make retries safe: a repeat with the same key within 24 hours returns the original message instead of sending again. Without it the API generates a key and sends once. Use threadId to reply to an existing thread. When replying on a thread where your inbox was CC'd (deliveryRole cc), the original sender is automatically CC'd.

Every recipient this call can reach — to, cc (including any address auto-CC'd on a thread reply), bcc, and replyTo — is checked against the inbox's outbound correspondent policy before anything is sent. A single denied recipient rejects the whole send with 403 recipient_not_permitted; there is no partial delivery.

bcc recipients are delivered and stored on the outbound message, but they are not listed on the copy To and Cc recipients receive. An address already in to or cc is not also blind-copied.

post/v1/inboxes/{id}/send

Request

  • Base URL: https://api.openmail.sh
  • URL: https://api.openmail.sh/v1/inboxes/{id}/send
  • Auth: HTTP bearer

Path parameters

idstring required

Headers

idempotency-keystring

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.

Request body

tostring email required
subjectstring

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

bodystring required

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

bodyHtmlstring

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

threadIdstring

Thread ID for replies

includeQuoteboolean

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.

replyTostring 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.

ccstring[]

Optional CC recipients. Visible to every recipient.

bccstring[]

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.

Response

Email sent (or idempotent replay)

messageIdstring
threadIdstring
providerMessageIdstring
status'pending' | 'sent' | 'failed'

Changes

No recorded changes to this operation across all 1 revision of this API.