Send an email
POST
/emails/send
const url = 'https://mail.teamander.com/v1/emails/send';const options = { method: 'POST', headers: { 'Idempotency-Key': 'order-1234-receipt', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"to":"jane@example.com","from":"billing@yourdomain.com","subject":"Your receipt","template_id":"receipt","data":{"name":"Jane","amount":"$42.00"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Idempotency-Key
Unique key to make the send idempotent across retries
string
Example
order-1234-receiptRequest Body
Section titled “Request Body”Media typeapplication/json
object
to
required
Any of:
string format: email
Array<string>
from
string format: email
subject
string
template_id
string
data
object
key
additional properties
html
string
text
string
metadata
object
key
additional properties
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" }}Responses
Section titled “Responses”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
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"}