Skip to main content
POST
/
v1
/
inboxes
/
{id}
/
send
Send email
curl --request POST \
  --url https://api.openmail.sh/v1/inboxes/{id}/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "to": "jsmith@example.com",
  "subject": "<string>",
  "body": "<string>",
  "bodyHtml": "<string>",
  "threadId": "<string>",
  "includeQuote": true,
  "replyTo": "jsmith@example.com"
}
'
{
  "messageId": "<string>",
  "threadId": "<string>",
  "providerMessageId": "<string>"
}

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string
required

Unique key for idempotent sends (e.g. UUID)

Path Parameters

id
string
required

Body

to
string<email>
required
subject
string
required
Required string length: 1 - 998
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
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. Developer plan or higher: any valid email address.

Response

Email sent (or idempotent replay)

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