API referenceEmails

Send a batch of emails

POST/emails/batch

Queues up to 100 emails in one request. x-batch-validation: strict (default) rejects the whole batch when one item is invalid; permissive sends the valid items and returns errors[] with the index of each rejected one.

Authorization

apiKey
AuthorizationBearer <token>

A project API key: Authorization: Bearer s0_…

In: header

Header Parameters

idempotency-key?string
Length1 <= length <= 256
x-batch-validation?string

Value in

  • "strict"
  • "permissive"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Items1 <= items <= 100
[index: integer]?

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/emails/batch" \  -H "Content-Type: application/json" \  -d '[    {      "to": "string"    }  ]'
{  "data": [    {      "id": "string"    }  ],  "errors": [    {      "index": 0,      "message": "string"    }  ]}