Today we're releasing a new API endpoint to cancel a Broadcast.
The Broadcast API lets you programmatically create, update, schedule, and send Broadcasts through code. Since you can build Broadcasts programmatically, it enables powerful marketing flows:
Sometimes things go wrong: you discover a typo or a wrong link mid-send. While you can cancel a Broadcast from the dashboard, starting today you can cancel the Broadcast programmatically using the API, too.
Canceling has different behavior depending on the status of the Broadcast. You can cancel a Broadcast when it has either been scheduled, before any emails are sent, or queued, once emails start sending.
When you cancel a Broadcast, here's what happens based on its status:
scheduled -> draft: no emails are sent, you can update the Broadcast and reschedule it to be sent.queued -> canceled: emails that have already been sent are not affected, but any emails still in the queue will no longer be sent.When you create or send a Broadcast the API returns an ID. You can also get a Broadcast's ID by listing broadcasts.
To cancel a Broadcast, use the Broadcast's ID with the cancel endpoint.
import { Resend } from 'resend';const resend = new Resend('re_xxxxxxxxx');const { data, error } = await resend.broadcasts.cancel('559ac32e-9ef5-46fb-82a1-b76b840c0f7b',);
The cancel Broadcast API is part of a larger move to bring the full functionality of the dashboard into the API, so you can build how you want. Build full Broadcast functionality into your own app, use it from the CLI, or delegate it to your agent through the MCP server. Stay tuned for more.