Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

Duplicate Broadcast

POST

/

broadcasts

/

:broadcast_id

/

duplicate

Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.broadcasts.duplicate(
  '559ac32e-9ef5-46fb-82a1-b76b840c0f7b',
);
PHP
$resend = Resend::client('re_xxxxxxxxx');

$resend->broadcasts->duplicate('559ac32e-9ef5-46fb-82a1-b76b840c0f7b');
Python
import resend

resend.api_key = "re_xxxxxxxxx"

resend.Broadcasts.duplicate(id="559ac32e-9ef5-46fb-82a1-b76b840c0f7b")
Ruby
require "resend"

Resend.api_key = "re_xxxxxxxxx"

Resend::Broadcasts.duplicate("559ac32e-9ef5-46fb-82a1-b76b840c0f7b")
Go
package main

import "github.com/resend/resend-go/v4"

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	client.Broadcasts.Duplicate("559ac32e-9ef5-46fb-82a1-b76b840c0f7b")
}
Rust
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let _duplicated = resend
    .broadcasts
    .duplicate("559ac32e-9ef5-46fb-82a1-b76b840c0f7b")
    .await?;

  Ok(())
}
Java
import com.resend.Resend;
import com.resend.services.broadcasts.model.DuplicateBroadcastResponseSuccess;

Resend resend = new Resend("re_xxxxxxxxx");

DuplicateBroadcastResponseSuccess data = resend.broadcasts().duplicate("559ac32e-9ef5-46fb-82a1-b76b840c0f7b");
.NET
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI

await resend.BroadcastDuplicateAsync( new Guid( "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" ) );
cURL
curl -X POST 'https://api.resend.com/broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b/duplicate' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json'
CLI
resend broadcasts duplicate 559ac32e-9ef5-46fb-82a1-b76b840c0f7b
Response
{
  "object": "broadcast",
  "id": "1f85ae38-f5b9-4c1f-8766-667a53970fea"
}

Creates a new draft broadcast with the same segment, topic, sender, subject, reply-to, preview text, and content as the source. The copy is named after the source with (copy) appended, truncated to 70 characters. Any broadcast can be duplicated, including sent ones.

Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.broadcasts.duplicate(
  '559ac32e-9ef5-46fb-82a1-b76b840c0f7b',
);
PHP
$resend = Resend::client('re_xxxxxxxxx');

$resend->broadcasts->duplicate('559ac32e-9ef5-46fb-82a1-b76b840c0f7b');
Python
import resend

resend.api_key = "re_xxxxxxxxx"

resend.Broadcasts.duplicate(id="559ac32e-9ef5-46fb-82a1-b76b840c0f7b")
Ruby
require "resend"

Resend.api_key = "re_xxxxxxxxx"

Resend::Broadcasts.duplicate("559ac32e-9ef5-46fb-82a1-b76b840c0f7b")
Go
package main

import "github.com/resend/resend-go/v4"

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	client.Broadcasts.Duplicate("559ac32e-9ef5-46fb-82a1-b76b840c0f7b")
}
Rust
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let _duplicated = resend
    .broadcasts
    .duplicate("559ac32e-9ef5-46fb-82a1-b76b840c0f7b")
    .await?;

  Ok(())
}
Java
import com.resend.Resend;
import com.resend.services.broadcasts.model.DuplicateBroadcastResponseSuccess;

Resend resend = new Resend("re_xxxxxxxxx");

DuplicateBroadcastResponseSuccess data = resend.broadcasts().duplicate("559ac32e-9ef5-46fb-82a1-b76b840c0f7b");
.NET
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI

await resend.BroadcastDuplicateAsync( new Guid( "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" ) );
cURL
curl -X POST 'https://api.resend.com/broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b/duplicate' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json'
CLI
resend broadcasts duplicate 559ac32e-9ef5-46fb-82a1-b76b840c0f7b
JSON
{
  "object": "broadcast",
  "id": "1f85ae38-f5b9-4c1f-8766-667a53970fea"
}

Was this page helpful?

⌘I

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu