Sign inGet Started

Cancel a broadcast

POST
/v1/email/broadcasts/{broadcast_id}/cancel
const broadcast = await bird.broadcasts.cancel("eb_01krdgeqcxet5s7t44vh8rt9mg");
console.log(broadcast.status);
Resposta202
{
  "id": "eb_01krdgeqcxet5s7t44vh8rt9mg",
  "from": {
    "email": "jane@acme.com",
    "name": "Jane Doe"
  },
  "audience_id": "adn_01krdgeqcxet5s7t44vh8rt9mg",
  "template": {
    "id": "emt_01krdgeqcxet5s7t44vh8rt9mg",
    "version_id": "emv_01krdgeqcxet5s7t44vh8rt9mg"
  },
  "category": "marketing",
  "reply_to": [
    {
      "email": "jane@acme.com",
      "name": "Jane Doe"
    }
  ],
  "tags": [
    {
      "name": "category",
      "value": "welcome"
    }
  ],
  "track_opens": true,
  "track_clicks": true,
  "created_at": "2026-09-01T09:14:02.418Z",
  "status": "canceling",
  "failure_reason": null,
  "failure_detail": null,
  "recipient_count": 4820,
  "scheduled_at": "2026-09-02T08:00:00Z",
  "started_at": "2026-09-02T08:00:03.771Z",
  "sent_at": null,
  "canceled_at": "2026-09-02T08:06:12.204Z"
}

Cancels a scheduled, accepted, or sending broadcast. Canceling it while it is sending stops every delivery that has not gone out yet, though messages already on their way to a recipient are not recalled.

Calling this again on a broadcast that is already canceling or canceled is idempotent: it returns the broadcast's current state rather than an error. A draft cannot be canceled, because it was never sent; use Delete a broadcast instead. A broadcast that already sent or failed has reached a terminal state and returns a conflict.

Parâmetros

broadcast_idstring

Broadcast identifier. Starts with eb_.

Payload de resposta

id
string
obrigatório

Broadcast ID.

from
object

The address this broadcast sends from. name is filled in when the broadcast was given a display name to send under. Left out on a draft that has not picked a sender yet.

Mostrar atributos secundários
from.email
string
obrigatório

Email address.

from.name
string

Display name shown alongside the address in mail clients.

audience_id
string

The audience this broadcast sends to. When the send starts we turn the audience into a list of recipients, and you can read that list a page at a time with List recipients of a broadcast. Left out on a draft that has not picked an audience yet.

template
nullable object

The template this broadcast sends, and the language it sends in. A broadcast sends the template's published version, and the exact version is fixed when the broadcast is prepared for sending, so publishing a new version afterwards does not change what this broadcast sends. Null on a draft that has not chosen a template yet.

Mostrar atributos secundários
template.id
string
obrigatório

Which template the broadcast sends. Which version of it the send is fixed to is version_id.

template.language
nullable string

The BCP-47 language tag selected for the whole audience, such as en or pt-BR. null means no language is selected, so the broadcast uses the published version's default language, unless the template has language_source_required set. Send template.language in an update to change or clear the selection.

template.version_id
nullable string

The template version this broadcast is fixed to. It is chosen when the broadcast is prepared for sending, so publishing a new version while the broadcast is going out cannot change what the rest of the recipients get. Null until the broadcast is prepared.

html_bytes
integer

Size of the HTML body this broadcast sends, in bytes, or 0 when its content has no HTML part. Measured on the template version the broadcast sends, using the selected language. Recipient merge values can change its size. Returned on a single broadcast read, and absent from the list and from the broadcast that creating, updating, sending or canceling one returns, none of which measure the content. Absent too when the broadcast has no template or its content can no longer be read.

text_bytes
integer

Size of the plain-text body this broadcast sends, in bytes, or 0 when its content has no plain-text part. Measured, and absent, the same way as html_bytes.

category
string
obrigatório

What kind of email this is, which decides how suppressions apply to it. A marketing broadcast is held back from every suppressed address. A transactional one still goes to addresses suppressed for a complaint or an unsubscribe, because those suppressions are about marketing mail.

Possible values: marketing, transactional

ip_pool_id
string

The IP pool this broadcast sends from, or ipp_shared when it sends through the shared pool. Absent when it sends on your organization's default pool.

reply_to
array of object

Where replies to this broadcast go, if you want them somewhere other than the from address. Absent when you have not set one.

Mostrar atributos secundários
reply_to.email
string
obrigatório

Email address.

reply_to.name
string

Display name shown alongside the address in mail clients.

headers
object

Any custom email headers set on the broadcast. Returned on a single broadcast read and on the broadcast that creating, updating, sending or canceling one returns, and absent from the list. The unsubscribe headers we add ourselves are not included.

status
string
obrigatório

Where the broadcast itself has got to, separate from what happened to individual recipients: for that, read sent_count, delivered_count, bounced_count and complained_count below. When it is failed, failure_reason says why.

next
array of object

What to do next about this broadcast, given the state it is in. Each entry names one action and says why it is worth taking. Present on reads that compute it: an empty list means there is nothing to do, and the field is absent entirely on responses that do not report next actions.

Mostrar atributos secundários
next.kind
string
obrigatório

What you do about this step.

  • operation: call the operation named in operation, then read again.
  • external: act somewhere this API does not reach, then read again.
  • wait: nothing is asked of you, so read again later.
  • terminal: nothing you do resolves this, so stop retrying.

Tolerate a value you do not recognize: show the description and offer no action.

Possible values (may grow over time): operation, external, wait, terminal

next.description
string
obrigatório

A short, human-readable label for the step, suitable for display.

next.operation
string

The operationId to call. Present only when kind is operation. The operation's own schema says how to call it; this says only which one, and what to address it with.

next.params
object

The parameters that address the operation, by name: {"sender_id": "…"} for an operation on /v1/sms/senders/{sender_id}/requirements. A parameter the operation takes in its query string is given the same way, so an operation addressed as ?subject_id= carries {"subject_id": "…"}. Every parameter the call needs is here, whether its value came from the thing you were acting on or is fixed for this step, so you can make the call from this object alone. Present only when kind is operation and the operation names a subject. A request body, when the operation takes one, is described by the operation's own schema and never appears here.

next.url
string

A URL to open. Present only when kind is external, and only when the step has one. An external step whose description says to go and do something with no URL to open is normal.

failure_reason
nullable string

Why the broadcast failed. Set when status is failed, and null the rest of the time.

  • empty_audience: There was nobody to send to. Either the audience has no members, or every address in it is suppressed.
  • audience_unavailable: The audience no longer exists, so there was nothing to resolve.
  • content_invalid: The broadcast could not be set up to send. failure_detail explains what went wrong. It is one of these:
    • The broadcast has no template, or the template it uses no longer exists. Choose an existing template and send the broadcast again.
    • The template has no published version, or its published version has no subject and no body. Publish the template, or add content and publish it.
    • The template uses a loop or reads a value that a broadcast cannot provide. Remove it, or use a contact property instead, then publish the template again.
    • The template requires a language, but the broadcast has not selected one. Set template.language to one of the template's languages and send the broadcast again.
    • The selected language is not available on the published template version. Choose one of that version's languages, or publish a version that includes the selected language.
    • The sending domain is no longer verified. Verify the domain again.
    • The configured IP pool has no usable IP address.
    • We could not hand the prepared message to the delivery system. This is a problem on our side.
  • insufficient_funds: There was not enough in the workspace balance to pay for the send.
  • quota_exceeded: The send would have gone past your organization's daily or monthly email allowance, whichever runs out first. This can happen when the broadcast is being prepared, or partway through sending if the remaining recipients no longer fit. failure_detail gives you the count and the limit.
  • internal_error: Something went wrong on our side. Retry, and open a support ticket if it keeps happening.

Possible values: empty_audience, audience_unavailable, content_invalid, insufficient_funds, quota_exceeded, internal_error, null

failure_detail
nullable string

A sentence explaining the failure in more detail than failure_reason does, and null when the broadcast has not failed. Show it to the person using your app. Do not write code that reads it, because the wording can change. Branch on failure_reason instead.

recipient_count
integer
obrigatório

Number of recipients after suppressed addresses are removed from the audience. This is 0 until sending starts and the audience becomes a recipient list.

sent_count
integer

How many recipients the broadcast has been sent to, counting every recipient whose status is processed or later. The number rises while the broadcast is sending and stops changing once the broadcast has finished. These counters are exact. The email stats endpoints report on the same sending but are approximate, so use these numbers when you need the precise count. Absent when the broadcast comes back from creating, updating, sending or canceling it, none of which read the counters. List and single-broadcast reads return 0 when no delivery events are recorded. When counters are unavailable, those reads still return 200 and omit the counters. Read the broadcast again for the numbers.

delivered_count
integer

How many recipients' messages were accepted by their mail server. Absent when sent_count is.

bounced_count
integer

How many recipients the message could not be delivered to at all. Absent when sent_count is.

complained_count
integer

How many recipients marked the message as spam. Absent when sent_count is.

open_count
integer

How many times the message was opened, added up across every recipient. One recipient opening it twice counts twice. Absent when sent_count is.

click_count
integer

How many times a link in the message was clicked, added up across every recipient. One recipient clicking twice counts twice. Absent when sent_count is.

sending_ips
array of string

The IP addresses this broadcast's messages went out from, up to 100 of them. A broadcast is spread across every address in its pool, so more than one can appear. The receiving mail systems name the address when they deliver, bounce or defer a message, so this stays absent until the first of those comes back. Returned on a single broadcast read, and absent from the list and from the broadcast that creating, updating, sending or canceling one returns, none of which read them. For delivery and latency broken down per address, read the sending-IP stats.

unique_opens_non_prefetched
integer

How many distinct recipients opened the message at least once, excluding opens auto-fetched by inbox privacy features (such as Apple Mail Privacy Protection and the Gmail image proxy). A recipient who opened several times, or whose inbox prefetched the message, counts once. Absent when sent_count is.

unique_clicks
integer

How many distinct recipients clicked a link in the message at least once. A recipient who clicked several times counts once. Absent when sent_count is.

out_of_band_bounces
integer

How many recipients bounced after the message had already been accepted for delivery. A recipient who bounced this way more than once counts once. Absent when sent_count is.

delivered_recipients
integer

How many distinct recipients a delivery landed for. This is the denominator to measure unique_opens_non_prefetched, unique_clicks and complained_count against. It differs from delivered_count, which reports how many recipients are currently in the delivered state: a recipient who was delivered to and then complained moves to complained_count and leaves delivered_count, but stays here, because the message did reach them. Absent when sent_count is.

tags
array of object

Labels on this broadcast, each one a name and a value, that you can filter and search broadcasts by. Use tags for anything you want to find broadcasts by later, and metadata for data you only want handed back to you.

Mostrar atributos secundários
tags.name
string
obrigatório

Tag name. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 32 characters.

tags.value
string
obrigatório

Tag value. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 64 characters.

metadata
object

Any JSON you want to keep on the broadcast. We store it and hand it back in webhook payloads, and that is all it does. If you want to search or filter by it, use tags instead.

track_opens
boolean
obrigatório

Whether opens are tracked for this broadcast.

track_clicks
boolean
obrigatório

Whether link clicks are tracked for this broadcast.

created_at
string
obrigatório

When the broadcast was created.

scheduled_at
string

When the broadcast is due to send, and absent when it is not scheduled.

started_at
string

When the broadcast started sending. Absent until then. Compare with sent_at, which is when the broadcast finished sending.

sent_at
nullable string
obrigatório

When the last recipient was sent to and the broadcast became sent. Null until then. Compare with started_at, which is when the broadcast started sending.

canceled_at
string

When the broadcast was canceled, and absent if it never was. This is when cancellation was requested, so it is set as soon as the status is canceling and does not move while the remaining sends stop and the status becomes canceled.