Skip to main content
POST
/
broadcasts
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = 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

from
string
required
Sender email address.To include a friendly name, use the format "Your Name <sender@domain.com>".
subject
string
required
Email subject.
html
string
The HTML version of the message.
text
string
The plain text version of the message.
If not provided, the HTML will be used to generate a plain text version. You can opt out of this behavior by setting value to an empty string.
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');

const { data, error } = 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"
}
I