Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Trigger up to 100 batch emails at once.

POST/emails/batchTrigger up to 100 batch emails at once.

Parameters

Idempotency-Keystringheader

A unique identifier for the request to ensure emails are only sent once. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys)

maxLength 256

Request body

application/json
array of object
Show array items
attachmentsarray of object
Show child attributes
Show array items
contentstring · binary

Content of an attached file.

content_idstring

Content ID for embedding inline images using cid references (e.g., cid:image001).

content_typestring

Optional content type for the attachment, if not set it will be derived from the filename property

filenamestring

Name of attached file.

pathstring

Path where the attachment file is hosted

bccvalue

Bcc recipient email address. For multiple addresses, send as an array of strings.

Show child attributes
oneOf · 2 options
Option 1string
Option 2array of string
ccvalue

Cc recipient email address. For multiple addresses, send as an array of strings.

Show child attributes
oneOf · 2 options
Option 1string
Option 2array of string
fromstringrequired

Sender email address. To include a friendly name, use the format "Your Name <sender@domain.com>".

headersobject

Custom headers to add to the email.

htmlstring

The HTML version of the message.

reply_tovalue

Reply-to email address. For multiple addresses, send as an array of strings.

Show child attributes
oneOf · 2 options
Option 1string
Option 2array of string
scheduled_atstring

Schedule email to be sent later. The date should be in ISO 8601 format.

subjectstringrequired

Email subject.

tagsarray of object
Show child attributes
Show array items
namestring

The name of the email tag. It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters.

valuestring

The value of the email tag.It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters.

templatevalue
Show child attributes
allOf · 2 options
Option 1objectEmailTemplateInput
idstringrequired

The id of the published email template.

variablesobject

Template variables object with key/value pairs.

Option 2value

Use a published template to send the email. If provided, do not include html or text.

textstring

The plain text version of the message.

tovaluerequired

Recipient email address. For multiple addresses, send as an array of strings. Max 50.

Show child attributes
oneOf · 2 options
Option 1string
Option 2array of string

maxItems 50 · minItems 1

topic_idstring

The topic ID to scope the email to. If the recipient is a contact and opted-in to the topic, the email is sent. If opted-out, the email is not sent. If the recipient is not a contact, the email is sent if the topic's default subscription is opt_in.

Example request
[
  {
    "attachments": [
      {
        "content": "binary",
        "content_id": "string",
        "content_type": "string",
        "filename": "string",
        "path": "string"
      }
    ],
    "bcc": "string",
    "cc": "string",
    "from": "string",
    "headers": {},
    "html": "string",
    "reply_to": "string",
    "scheduled_at": "string",
    "subject": "string",
    "tags": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "template": {
      "id": "string",
      "variables": {
        "variableName": "Sign up now",
        "variableName2": 123
      }
    },
    "text": "string",
    "to": "string",
    "topic_id": "string"
  }
]

Responses

200OKapplication/json
objectCreateBatchEmailsResponse
dataarray of object
Show child attributes
Show array items
idstring

The ID of the sent email.

Example response
{
  "data": [
    {
      "id": "string"
    }
  ]
}
Documentation menu