Batch Emails
Send up to 100 transactional emails in one request.
MethodPOST
/api/v2/emails/batchSends up to 100 transactional emails. Body is a JSON array of the same objects as Send Email. Permission: emails.
Body Parameters
Each array item:
| Name | Type | Description |
|---|---|---|
from | string | Required. Sender. Display name is allowed. Domain must be verified. |
to | string or [string] | Required. One recipient. A one-address array is accepted. |
subject | string | Required. Subject line. |
html | string | HTML body. Provide exactly one of html, tiptap, or markdown. |
tiptap | string or object | TipTap JSON. Rendered to HTML on send. |
markdown | string | Markdown body. Rendered to HTML on send. |
text | string | Plain-text body. Omit to generate from HTML. |
reply_to | string or string[] | Reply-To addresses. |
cc | string or string[] | Carbon copies. |
bcc | string or string[] | Blind carbon copies. |
headers | object | Extra MIME headers. |
tags | { name, value }[] | Metadata tags stored on the email. |
preview | string | Preview / preheader text. |
Options
| Name | Type | Description |
|---|---|---|
Idempotency-Key | string | Optional header. Suffixed with :index per item. SDK: pass { idempotencyKey } as the second argument to emails.batch. |
Response Fields
| Field | Type | Description |
|---|---|---|
data | { id }[] | Queued email ids, same order as the request. |
Errors
| Status | name | When |
|---|---|---|
| 401 | missing_api_key | Missing or invalid bearer token |
| 403 | missing_permission | Token lacks the emails permission |
| 422 | validation_error | Body is not an array, or an item fails send validation |