Send a batch of emails
Send up to 100 emails in one request. Returns 207 Multi-Status if any entry failed, or 200 if all succeeded. Per-entry results are reported in the data array.
The whole batch is ONE idempotent unit: an Idempotency-Key replayed with the same entry list replays the same per-index results, and replaying it with an edited list answers 422 IDEMPOTENCY_KEY_REUSED rather than returning results for indexes the new body no longer has.
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
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Batch send wrapper. Up to 100 entries.
Response Body
application/json
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/batch" \ -H "Content-Type: application/json" \ -d '{ "emails": [ { "to": "user@example.com" } ] }'{
"success": true,
"data": [
{
"index": 0,
"status": "ok",
"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"
},
"error": {
"message": "string",
"code": "string"
}
}
]
}{
"success": true,
"data": [
{
"index": 0,
"status": "ok",
"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"
},
"error": {
"message": "string",
"code": "string"
}
}
]
}{
"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
]
}
}
}