POST
/
emails
/
batch
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

await resend.batch.send([
  {
    from: 'Acme <onboarding@resend.dev>',
    to: ['foo@gmail.com'],
    subject: 'hello world',
    html: '<h1>it works!</h1>',
  },
  {
    from: 'Acme <onboarding@resend.dev>',
    to: ['bar@outlook.com'],
    subject: 'world hello',
    html: '<p>it works!</p>',
  },
]);
{
  "data": [
    {
      "id": "ae2014de-c168-4c61-8267-70d2662a1ce1"
    },
    {
      "id": "faccb7a5-8a28-4e9a-ac64-8da1cc3bc1cb"
    }
  ]
}
Instead of sending one email per HTTP request, we provide a batching endpoint that permits you to send up to 100 emails in a single API call.

Body Parameters

from
string
required
Sender email address.To include a friendly name, use the format "Your Name <sender@domain.com>".
to
string | string[]
required
Recipient email address. For multiple addresses, send as an array of strings. Max 50.
subject
string
required
Email subject.
bcc
string | string[]
Bcc recipient email address. For multiple addresses, send as an array of strings.
cc
string | string[]
Cc recipient email address. For multiple addresses, send as an array of strings.
reply_to
string | string[]
Reply-to email address. For multiple addresses, send as an array of strings.
html
string
The HTML version of the message.
text
string
The plain text version of the message.
react
React.ReactNode
The React component used to write the message. Only available in the Node.js SDK.
headers
object
Custom headers to add to the email.

Headers

Idempotency-Key
string
Add an idempotency key to prevent duplicated emails.
  • Should be unique per API request
  • Idempotency keys expire after 24 hours
  • Have a maximum length of 256 characters
Learn more

Limitations

The attachments, tags, and scheduled_at fields are not supported yet.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

await resend.batch.send([
  {
    from: 'Acme <onboarding@resend.dev>',
    to: ['foo@gmail.com'],
    subject: 'hello world',
    html: '<h1>it works!</h1>',
  },
  {
    from: 'Acme <onboarding@resend.dev>',
    to: ['bar@outlook.com'],
    subject: 'world hello',
    html: '<p>it works!</p>',
  },
]);
{
  "data": [
    {
      "id": "ae2014de-c168-4c61-8267-70d2662a1ce1"
    },
    {
      "id": "faccb7a5-8a28-4e9a-ac64-8da1cc3bc1cb"
    }
  ]
}