POST
/
broadcasts
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

await resend.broadcasts.create({
  audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
  from: 'Acme <onboarding@resend.dev>',
  subject: 'hello world',
  html: 'Hi {{{FIRST_NAME|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
});
{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}

Body Parameters

audience_id
string
required
The ID of the audience you want to send to.
from
string
required
Sender email address.To include a friendly name, use the format "Your Name <sender@domain.com>".
subject
string
required
Email subject.
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.
name
string
The friendly name of the broadcast. Only used for internal reference.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

await resend.broadcasts.create({
  audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
  from: 'Acme <onboarding@resend.dev>',
  subject: 'hello world',
  html: 'Hi {{{FIRST_NAME|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
});
{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}