EmailBatchRequest
strict rejects the whole batch with 422 if any message is invalid, and sends nothing. permissive sends the valid messages and reports the rest per index in errors.
Possible values: [strict, permissive]
strictemails object[]required
Array of emails to send (1-100).
Possible values: >= 1, <= 100
from objectrequired
Sender email address as a string or {email, name} object.
- string
- object
Email address as a plain string.
Email address as a plain string.
to objectrequired
Recipient email address(es).
- string
- string[]
cc object
- string
- string[]
bcc object
- string
- string[]
reply_to object
Reply-to address as a string or {email, name} object.
- string
- object
Email address as a plain string.
Email address as a plain string.
headers object
template_data object
Render a specific template version instead of the published one. Use this for safe deploys.
Possible values: >= 1
attachments object[]
File attachments. Supports inline content, pre-uploaded references, and URL-based.
- Attachment
- AttachmentRef
- AttachmentURL
Filename of the attachment.
Base64-encoded file content.
MIME type of the attachment.
Content disposition. Use "inline" for CID-referenced images.
Possible values: [attachment, inline]
attachmentContent-ID for inline images (e.g. "logo"). Referenced in HTML as cid:logo.
String tags for categorization. Indexed and queryable.
Possible values: <= 50
Arbitrary JSON metadata (up to 10KB). Stored and returned in events/webhooks.
tracking object
Override domain-level open tracking for this email.
Override domain-level click tracking for this email.
URL patterns to exclude from click tracking (e.g. "unsubscribe", "magic_link").
preflight object
Run spam scoring on the email content before sending.
Validate the email (DNS, formatting) before sending.
Schedule the email for future delivery (ISO 8601). Must be in the future and within 72 hours.
Set to true to bypass duplicate detection. Use for legitimate cases like OTP resends.
{
"validation": "strict",
"emails": [
{
"from": "string",
"to": "string",
"subject": "string",
"cc": "string",
"bcc": "string",
"reply_to": "string",
"text": "string",
"html": "string",
"headers": {},
"template_id": "string",
"template_data": {},
"template_version": 0,
"attachments": [
{
"filename": "string",
"content": "string",
"content_type": "string",
"content_disposition": "attachment",
"content_id": "string"
},
{
"attachment_id": "string"
},
{
"filename": "string",
"content_url": "string",
"content_type": "string"
}
],
"tags": [
"string"
],
"metadata": {},
"tracking": {
"opens": true,
"clicks": true,
"clicks_exclude": [
"string"
]
},
"preflight": {
"spam_check": true,
"validate": true
},
"scheduled_at": "2024-07-29T15:51:28.071Z",
"allow_duplicate": true
}
]
}