Skip to main content
POST
/
emails
/
send
Send a single email
curl --request POST \
  --url https://smtp.sendmux.ai/api/v1/emails/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": {
    "email": "user@example.com",
    "name": "John Smith"
  },
  "to": {
    "email": "user@example.com",
    "name": "John Smith"
  },
  "subject": "Welcome to Sendmux",
  "html_body": "<string>"
}
'
{
  "ok": true,
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "data": {
    "message_id": "eml_tz4a98xxat96iws9zmbrgj3a",
    "status": "queued"
  }
}

Authorizations

Authorization
string
header
required

Sendmux API key (smx_...)

Headers

Idempotency-Key
string

Optional client-generated key to make the request idempotent for 24 hours. Replays under the same key return the cached response; a reused key with a different body returns 409 idempotency_conflict.

Maximum string length: 255

Body

application/json
from
object
required

Sender address

to
object
required

Primary recipient

subject
string
required

Email subject line (max 998 chars, RFC 5322)

Required string length: 1 - 998
Pattern: ^[^\r\n]*$
Example:

"Welcome to Sendmux"

html_body
string
required

HTML email content (max 25MB)

Required string length: 1 - 26214400
text_body
string

Plain text alternative (max 25MB)

Maximum string length: 26214400
reply_to
object

Reply-To address

return_path
string<email>

Envelope sender for VERP support

Maximum string length: 254
cc
object[]

CC recipients (max 100)

Maximum array length: 100
bcc
object[]

BCC recipients (max 100)

Maximum array length: 100
custom_headers
object

Custom X-* headers to include in the email

attachments
object[]

File attachments (max 10)

Maximum array length: 10

Response

Email queued successfully

ok
enum<boolean>
required
Available options:
true
meta
object
required
data
object
required