Skip to content

Send a batch

const { data } = await resend.batch.send([
{ to: ["[email protected]"], subject: "Your receipt", html: "<p>Thanks.</p>" },
{ to: ["[email protected]"], template: { id: "vip-order", variables: { orderId: "A-2292" } } },
]);
data?.data; // [{ id: "dlv_…" }, { id: "dlv_…" }], in the order you sent them

Every message is checked before any of them is handed over, so a list with a mistake anywhere sends nothing and the answer names the message it means.

Idempotency-Key is honoured on a single send, where a repeat of the same key replays the first answer. It is ignored on a batch: retry one and you have sent it twice.