Introducing the Batch Emails API

Process a high volume of emails at once with the new bulk endpoint.

Vitor CapretzVitor Capretz
Introducing the Batch Emails API

Today, we're reaching GA for Batch Emails. This new endpoint allows you to send up to 100 emails in a single API call.

We know that many of our customers are sending multiple emails to multiple recipients at once. So, we wanted to make it simple for them to do so without having to write custom code, hit the rate limit, or use a third-party service.

Before, you would need to set up a queueing system to make that work. Now, we handle all the infrastructure and orchestration complexity so you can focus on your product.

Queue System Architecture

Sending Batch Emails

You can use the various Resend SDKs, including Python, Ruby, PHP, Go, and Java to send batch emails.

Here's an example using the Node.js SDK:

import { Resend } from 'resend';
const resend = new Resend('re_123456789');
const data = 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>',
},
]);

The REST endpoint is available at POST /emails/batch, and it accepts an array of emails.

You can check the Resend OpenAPI spec or the Postman collection for all parameters.

curl -X POST 'https://api.resend.com/emails/batch' \
-H 'Authorization: Bearer re_123456789' \
-H 'Content-Type: application/json' \
-d $'[
{
"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>"
}
]'

Note that the attachments and tags fields are not supported yet.

Get started

We hope this new endpoint makes it easier for you to send emails to multiple recipients, all while ensuring that every message is delivered to each contact individually.

Keep in mind that the number of emails you can send in a single batch (currently 100) is customizable, so if you have specific needs, please contact support.

You can check the documentation for more details.