rembrembdocs

Node.js

import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.broadcasts.update(
  '49a3999c-0ce1-4ea6-ab68-afcd6dc2e794',
  {
    html: 'Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
  },
);
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.broadcasts.update(
  '49a3999c-0ce1-4ea6-ab68-afcd6dc2e794',
  {
    html: 'Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
  },
);
{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}

PATCH

/

broadcasts

/

:broadcast_id

Node.js

import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.broadcasts.update(
  '49a3999c-0ce1-4ea6-ab68-afcd6dc2e794',
  {
    html: 'Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
  },
);
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.broadcasts.update(
  '49a3999c-0ce1-4ea6-ab68-afcd6dc2e794',
  {
    html: 'Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
  },
);
{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}

Documentation Index

Fetch the complete documentation index at: https://resend.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

The ID of the broadcast you want to update.

Body Parameters

The ID of the segment you want to send to.

Sender email address.To include a friendly name, use the format "Your Name <sender@domain.com>".

Reply-to email address. For multiple addresses, send as an array of strings.

The HTML version of the message.

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.

The React component used to write the message. Only available in the Node.js SDK.

The friendly name of the broadcast. Only used for internal reference.

The topic ID that the broadcast will be scoped to.