Send a single transactional email
Send a single transactional email. Accepts a template ID or an inline subject + body. An optional Idempotency-Key request header (1–255 chars, 24h TTL) ensures replay safety: the first request wins and a retry carrying the same key AND the same body replays its response. Reusing a key with a DIFFERENT body answers 422 IDEMPOTENCY_KEY_REUSED — a key names one request, so it is never silently served another request's result.
Requires the emails:send scope — Send emails from your verified domains.
API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
In: header
Header Parameters
Replay-safety key (24h TTL). Reuse it only to retry the identical request.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Body for POST /api/emails — send a single transactional email. Either template or subject+body is required.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/emails" \ -H "Content-Type: application/json" \ -d '{ "to": "user@example.com" }'{
"success": true,
"data": {
"emails": [
{
"contact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"email": "user@example.com"
},
"email": "bd2f409a-4b68-41eb-89af-5a917d812282"
}
],
"timestamp": "2019-08-24T14:15:22Z"
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}