use resend_rs::{types::UpdateBroadcastOptions, Resend, Result};#[tokio::main]async fn main() -> Result<()> { let resend = Resend::new("re_xxxxxxxxx"); let id = "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"; let html = "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}"; let opts = UpdateBroadcastOptions::new().with_html(html); let _broadcast = resend.broadcasts.update(id, opts).await?; Ok(())}
import com.resend.Resend;import com.resend.services.broadcasts.model.UpdateBroadcastOptions;import com.resend.services.broadcasts.model.UpdateBroadcastResponseSuccess;Resend resend = new Resend("re_xxxxxxxxx");UpdateBroadcastOptions params = UpdateBroadcastOptions.builder() .id("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794") .html("Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}") .build();UpdateBroadcastResponseSuccess data = resend.broadcasts().update(params);
using Resend;IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DIvar resp = await resend.BroadcastUpdateAsync( new Guid( "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794" ), new BroadcastUpdateData() { HtmlBody = "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}", });
Sender email address.To include a friendly name, use the format "Your Name <sender@domain.com>".
string
Email subject.
string
The HTML version of the message. You can include contact properties in the
body of the Broadcast. Learn more about contact
properties.
Contact placeholders like {{{contact.first_name|there}}} work in Broadcasts
only. Templates can’t read them. To personalize a Template sent by an
Automation, add a Template variable and map it to a contact property in the
Send Email step.
string
The plain text version of the message. Like html, it can include contact
properties, which work in Broadcasts only.
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.ReactNode
The React component used to write the message. Only available in the Node.js
SDK.
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.update( '49a3999c-0ce1-4ea6-ab68-afcd6dc2e794', { html: 'Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}', },);
$resend = Resend::client('re_xxxxxxxxx');$resend->broadcasts->update('49a3999c-0ce1-4ea6-ab68-afcd6dc2e794', [ 'html' => 'Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',]);
import resendresend.api_key = "re_xxxxxxxxx"params: resend.Broadcasts.UpdateParams = { "broadcast_id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", "html": "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}"}resend.Broadcasts.update(params)
require "resend"Resend.api_key = "re_xxxxxxxxx"params = { "broadcast_id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", "html": "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}",}Resend::Broadcasts.update(params)
use resend_rs::{types::UpdateBroadcastOptions, Resend, Result};#[tokio::main]async fn main() -> Result<()> { let resend = Resend::new("re_xxxxxxxxx"); let id = "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"; let html = "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}"; let opts = UpdateBroadcastOptions::new().with_html(html); let _broadcast = resend.broadcasts.update(id, opts).await?; Ok(())}
import com.resend.Resend;import com.resend.services.broadcasts.model.UpdateBroadcastOptions;import com.resend.services.broadcasts.model.UpdateBroadcastResponseSuccess;Resend resend = new Resend("re_xxxxxxxxx");UpdateBroadcastOptions params = UpdateBroadcastOptions.builder() .id("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794") .html("Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}") .build();UpdateBroadcastResponseSuccess data = resend.broadcasts().update(params);
using Resend;IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DIvar resp = await resend.BroadcastUpdateAsync( new Guid( "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794" ), new BroadcastUpdateData() { HtmlBody = "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}", });
use resend_rs::{types::UpdateBroadcastOptions, Resend, Result};#[tokio::main]async fn main() -> Result<()> { let resend = Resend::new("re_xxxxxxxxx"); let id = "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"; let html = "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}"; let opts = UpdateBroadcastOptions::new().with_html(html); let _broadcast = resend.broadcasts.update(id, opts).await?; Ok(())}
import com.resend.Resend;import com.resend.services.broadcasts.model.UpdateBroadcastOptions;import com.resend.services.broadcasts.model.UpdateBroadcastResponseSuccess;Resend resend = new Resend("re_xxxxxxxxx");UpdateBroadcastOptions params = UpdateBroadcastOptions.builder() .id("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794") .html("Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}") .build();UpdateBroadcastResponseSuccess data = resend.broadcasts().update(params);
using Resend;IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DIvar resp = await resend.BroadcastUpdateAsync( new Guid( "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794" ), new BroadcastUpdateData() { HtmlBody = "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}", });