Skip to content

Send an email

POST
/emails/send
curl --request POST \
--url https://mail.teamander.com/v1/emails/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: order-1234-receipt' \
--data '{ "to": "jane@example.com", "from": "billing@yourdomain.com", "subject": "Your receipt", "template_id": "receipt", "data": { "name": "Jane", "amount": "$42.00" } }'

Queues a transactional email for one or up to 50 recipients. Provide one of template_id, html, or text. Pass an Idempotency-Key header to make retries safe — a repeated key returns the original result with idempotent_replay: true and never sends twice. Custom headers values are stripped of CR/LF to prevent header injection.

Idempotency-Key

Unique key to make the send idempotent across retries

string
<= 255 characters
Example
order-1234-receipt
Media typeapplication/json
object
to
required
Any of:
string format: email
from
string format: email
subject
string
template_id
string
>= 1 characters <= 50 characters
data
object
key
additional properties
nullable
html
string
text
string
metadata
object
key
additional properties
nullable
headers
object
key
additional properties
string
Example
{
"to": "jane@example.com",
"from": "billing@yourdomain.com",
"subject": "Your receipt",
"template_id": "receipt",
"data": {
"name": "Jane",
"amount": "$42.00"
}
}

Idempotent replay of a previous send

Media typeapplication/json
object
queued
required
Array<object>
object
id
required
string
recipient
required
string
status
required
string
suppressed
Array<string>
idempotent_replay
boolean
Example
{
"queued": [
{
"id": "a1b2c3d4-...",
"recipient": "jane@example.com",
"status": "sent"
}
],
"idempotent_replay": true
}

Queued

Media typeapplication/json
object
queued
required
Array<object>
object
id
required
string
recipient
required
string
status
required
string
suppressed
Array<string>
idempotent_replay
boolean
Example
{
"queued": [
{
"id": "a1b2c3d4-...",
"recipient": "jane@example.com",
"status": "queued"
}
]
}

Validation failed

Media typeapplication/json
object
error
required
string
details
object
key
additional properties
nullable
Example
{
"error": "Validation failed",
"details": {}
}

Missing or invalid API key

Media typeapplication/json
object
error
required
string
message
string
Example
{
"error": "Invalid API key"
}

Rate limit or monthly quota exceeded

Media typeapplication/json
object
error
required
string
message
string
Example
{
"error": "Monthly email limit exceeded"
}