Send a batch of emails

POST
/v1/email/batch

Send up to 100 emails in one call. Each is validated and processed independently through the same pipeline as POST /v1/email; a per-email result is returned in input order. Consumes one rate-limit/quota unit per email in the batch (refunded per-email on rejection).

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key sent as Authorization: Bearer <key>. Looked up by SHA-256 hash (email_core::sha256_hex) against api_keys.hash; revoked keys and keys belonging to a suspended tenant are rejected. See the top-level Authentication section for permission levels.

Header Parameters

Idempotency-Key?string

Scopes the whole batch: a retried request with the same key returns the stored batch response verbatim, with no re-sends.

X-Relay-Test?string

If "true", simulate delivery for every email in the batch.

Value in"true""false"

Request Body

application/json
  1. body
emails*array<>
Items1 <= items <= 100

Response Body

Batch processed (per-item results carry each item's own status/error).

application/json
  1. response
data?array<>
curl -X POST "https://example.com/v1/email/batch" \  -H "Content-Type: application/json" \  -d '{    "emails": [      {        "from": "user@example.com"      }    ]  }'
{  "data": [    {      "message_id": "string",      "status": "queued",      "ses_message_id": "string",      "test_mode": true,      "scheduled_at": 0,      "reason": "string",      "idempotent_replay": true,      "error": "string",      "detail": "string",      "alias": "string",      "from": "string"    }  ]}