The broadcast object
Endpoints
Lifecycle
A broadcast starts as adraft. You can edit it, replace its recipients and preview it as often as you like; nothing is sent until you launch.
An action that does not apply to the current status returns
409 with a message such as cannot pause a broadcast that is draft. Only a draft can be edited or given new recipients. Only a draft or cancelled broadcast can be deleted.
Recipients and variables
- A file upload (
.csvor.xlsx, up to 10 MB) turns every column other than the phone column into a template variable named after its header. A JSON upload withnumbersgives a plain list with no variables. - Placeholders match column names case-insensitively, so
{{ Name }}fills from anamecolumn. Placeholders with no matching column render as empty text and appear in the preview’smissingVariables. - Numbers without a country code are normalised to E.164 with
defaultCountry(defaultUS). - Duplicates are dropped and invalid rows are reported with a reason. Numbers that opted out of SMS from you are stored as
opted_outand never sent. - A broadcast holds up to 10,000 recipients. Each upload replaces the previous list.
pending, sending, sent and delivered, or ends as failed, opted_out or skipped (still pending when the broadcast was cancelled).
Pagination
GET /broadcasts and GET /broadcasts/{id}/recipients take limit (1 to 500, default 50) and offset (default 0). Both return the page in an array next to a total count, so you can page until offset reaches total.
Example
Upload recipients from a CSV file to a draft:cURL
Response
Related
- Broadcasts guide - the full create, upload, preview and launch walkthrough.
- Opt-outs - how opted-out numbers are excluded from broadcasts.
- India DLT - the DLT IDs to set when you message Indian numbers.
- WebSocket - follow progress with the
broadcast.updatedevent. - Errors - error responses and how to handle them.