Skip to main content

EmailBatchRequest

validationstring

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]

Default value: strict
emails object[]required

Array of emails to send (1-100).

Possible values: >= 1, <= 100

  • Array [
  • from objectrequired

    Sender email address as a string or {email, name} object.

    oneOf

    Email address as a plain string.

    string

    Email address as a plain string.

    to objectrequired

    Recipient email address(es).

    oneOf
    string
    subjectstringrequired
    cc object
    oneOf
    string
    bcc object
    oneOf
    string
    reply_to object

    Reply-to address as a string or {email, name} object.

    oneOf

    Email address as a plain string.

    string

    Email address as a plain string.

    textstring
    htmlstring
    headers object
    property name*string
    template_idstring
    template_data object
    property name*string
    template_versioninteger

    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.

  • Array [
  • oneOf
    filenamestringrequired

    Filename of the attachment.

    contentstringrequired

    Base64-encoded file content.

    content_typestringrequired

    MIME type of the attachment.

    content_dispositionstring

    Content disposition. Use "inline" for CID-referenced images.

    Possible values: [attachment, inline]

    Default value: attachment
    content_idstring

    Content-ID for inline images (e.g. "logo"). Referenced in HTML as cid:logo.

  • ]
  • tagsstring[]

    String tags for categorization. Indexed and queryable.

    Possible values: <= 50

    metadataobject

    Arbitrary JSON metadata (up to 10KB). Stored and returned in events/webhooks.

    tracking object
    opensboolean

    Override domain-level open tracking for this email.

    clicksboolean

    Override domain-level click tracking for this email.

    clicks_excludestring[]

    URL patterns to exclude from click tracking (e.g. "unsubscribe", "magic_link").

    preflight object
    spam_checkboolean

    Run spam scoring on the email content before sending.

    validateboolean

    Validate the email (DNS, formatting) before sending.

    scheduled_atstring<date-time>

    Schedule the email for future delivery (ISO 8601). Must be in the future and within 72 hours.

    allow_duplicateboolean

    Set to true to bypass duplicate detection. Use for legitimate cases like OTP resends.

  • ]
  • EmailBatchRequest
    {
    "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
    }
    ]
    }