import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.broadcasts.send(
'559ac32e-9ef5-46fb-82a1-b76b840c0f7b',
{
scheduledAt: 'in 1 min',
},
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->broadcasts->send('559ac32e-9ef5-46fb-82a1-b76b840c0f7b', [
'scheduled_at' => 'in 1 min',
]);
import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Broadcasts.SendParams = {
"broadcast_id": "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
"scheduled_at": "in 1 min"
}
resend.Broadcasts.send(params)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
broadcast_id: "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
scheduled_at: "in 1 min"
}
Resend::Broadcasts.send(params)
package main
import "github.com/resend/resend-go/v3"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
sendParams := &resend.SendBroadcastRequest{
BroadcastId: "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
ScheduledAt: "in 1 min",
}
client.Broadcasts.Send(sendParams)
}
use resend_rs::{types::SendBroadcastOptions, Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let opts =
SendBroadcastOptions::new("559ac32e-9ef5-46fb-82a1-b76b840c0f7b").with_scheduled_at("in 1 min");
let _broadcast = resend.broadcasts.send(opts).await?;
Ok(())
}
Resend resend = new Resend("re_xxxxxxxxx");
SendBroadcastOptions params = SendBroadcastOptions.builder()
.scheduledAt("in 1 min")
.build();
SendBroadcastResponseSuccess data = resend.broadcasts().send(params,
"498ee8e4-7aa2-4eb5-9f04-4194848049d1");
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
// Send now
await resend.BroadcastSendAsync( new Guid( "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" ) );
// Send in 5 mins
await resend.BroadcastScheduleAsync(
new Guid( "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" ),
DateTime.UtcNow.AddMinutes( 5 ) );
curl -X POST 'https://api.resend.com/broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b/send' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"scheduled_at": "in 1 min"
}'
resend broadcasts send 559ac32e-9ef5-46fb-82a1-b76b840c0f7b --scheduled-at "in 1 min"
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}
Send Broadcast
Start sending broadcasts to your audience through the Resend API.
POST
/
broadcasts
/
:broadcast_id
/
send
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.broadcasts.send(
'559ac32e-9ef5-46fb-82a1-b76b840c0f7b',
{
scheduledAt: 'in 1 min',
},
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->broadcasts->send('559ac32e-9ef5-46fb-82a1-b76b840c0f7b', [
'scheduled_at' => 'in 1 min',
]);
import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Broadcasts.SendParams = {
"broadcast_id": "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
"scheduled_at": "in 1 min"
}
resend.Broadcasts.send(params)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
broadcast_id: "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
scheduled_at: "in 1 min"
}
Resend::Broadcasts.send(params)
package main
import "github.com/resend/resend-go/v3"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
sendParams := &resend.SendBroadcastRequest{
BroadcastId: "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
ScheduledAt: "in 1 min",
}
client.Broadcasts.Send(sendParams)
}
use resend_rs::{types::SendBroadcastOptions, Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let opts =
SendBroadcastOptions::new("559ac32e-9ef5-46fb-82a1-b76b840c0f7b").with_scheduled_at("in 1 min");
let _broadcast = resend.broadcasts.send(opts).await?;
Ok(())
}
Resend resend = new Resend("re_xxxxxxxxx");
SendBroadcastOptions params = SendBroadcastOptions.builder()
.scheduledAt("in 1 min")
.build();
SendBroadcastResponseSuccess data = resend.broadcasts().send(params,
"498ee8e4-7aa2-4eb5-9f04-4194848049d1");
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
// Send now
await resend.BroadcastSendAsync( new Guid( "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" ) );
// Send in 5 mins
await resend.BroadcastScheduleAsync(
new Guid( "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" ),
DateTime.UtcNow.AddMinutes( 5 ) );
curl -X POST 'https://api.resend.com/broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b/send' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"scheduled_at": "in 1 min"
}'
resend broadcasts send 559ac32e-9ef5-46fb-82a1-b76b840c0f7b --scheduled-at "in 1 min"
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}
You can send broadcasts only if they were created via the API.
Path Parameters
Body Parameters
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.broadcasts.send(
'559ac32e-9ef5-46fb-82a1-b76b840c0f7b',
{
scheduledAt: 'in 1 min',
},
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->broadcasts->send('559ac32e-9ef5-46fb-82a1-b76b840c0f7b', [
'scheduled_at' => 'in 1 min',
]);
import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Broadcasts.SendParams = {
"broadcast_id": "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
"scheduled_at": "in 1 min"
}
resend.Broadcasts.send(params)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
broadcast_id: "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
scheduled_at: "in 1 min"
}
Resend::Broadcasts.send(params)
package main
import "github.com/resend/resend-go/v3"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
sendParams := &resend.SendBroadcastRequest{
BroadcastId: "559ac32e-9ef5-46fb-82a1-b76b840c0f7b",
ScheduledAt: "in 1 min",
}
client.Broadcasts.Send(sendParams)
}
use resend_rs::{types::SendBroadcastOptions, Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let opts =
SendBroadcastOptions::new("559ac32e-9ef5-46fb-82a1-b76b840c0f7b").with_scheduled_at("in 1 min");
let _broadcast = resend.broadcasts.send(opts).await?;
Ok(())
}
Resend resend = new Resend("re_xxxxxxxxx");
SendBroadcastOptions params = SendBroadcastOptions.builder()
.scheduledAt("in 1 min")
.build();
SendBroadcastResponseSuccess data = resend.broadcasts().send(params,
"498ee8e4-7aa2-4eb5-9f04-4194848049d1");
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
// Send now
await resend.BroadcastSendAsync( new Guid( "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" ) );
// Send in 5 mins
await resend.BroadcastScheduleAsync(
new Guid( "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" ),
DateTime.UtcNow.AddMinutes( 5 ) );
curl -X POST 'https://api.resend.com/broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b/send' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"scheduled_at": "in 1 min"
}'
resend broadcasts send 559ac32e-9ef5-46fb-82a1-b76b840c0f7b --scheduled-at "in 1 min"
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}
Was this page helpful?
⌘I