Skip to content

Send an email

POST /emails

Send a single transactional email. The request returns immediately with a queued email ID; actual delivery happens asynchronously via the worker pool.

FieldTypeRequiredDescription
fromstringyesSender address. Must use a verified domain. Format: "Name <email@domain>" or email@domain.
tostring | string[]yesOne or more recipients (max 50).
subjectstringyesSubject line (max 998 chars).
htmlstringone of html/textHTML body.
textstringone of html/textPlain text body.
ccstring | string[]noCarbon-copy recipients.
bccstring | string[]noBlind-carbon-copy recipients.
reply_tostringnoReply-To header.
headersobjectnoExtra headers ({"X-Entity-Ref-ID": "..."}).
attachmentsobject[]noArray of {filename, content (base64), content_type, content_id}.
tagsobject[]noArray of {name, value} for analytics filtering.
scheduled_atISO 8601noDelay send until this timestamp (future, up to 72h out).
HeaderDescription
Idempotency-KeyOptional. Dedupes retries within a 24h window. See Idempotency.
Terminal window
curl -X POST https://mail.3ava.com/api/emails \
-H "Authorization: Bearer am_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <[email protected]>",
"to": ["[email protected]"],
"subject": "Your receipt",
"html": "<p>Thanks for your order.</p>",
"tags": [{"name": "category", "value": "receipt"}]
}'
{
"id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
"status": "queued",
"created_at": "2026-04-22T22:30:00Z"
}

status progresses queuedsentdelivered (or bounced / failed / suppressed). Track it via GET /emails/:id or webhooks.

{
"attachments": [
{
"filename": "invoice.pdf",
"content": "JVBERi0xLjQKJeLjz9MKMSAwIG9iag==",
"content_type": "application/pdf"
}
]
}

content is base64-encoded. Max total attachment size: 40MB.