Send an API-triggered broadcast
Trigger a broadcast (not a one-time send) and optionally provide data to populate liquid placeholders in the message.
The shape of the request depends on how you define your audience: default (the recipients set in the UI), custom filter conditions, a list of emails, a list of customer IDs, a map of users, or a data file.
You can only trigger broadcasts to send to people you've already added to your workspace. A broadcast cannot add or identify new people. If you reference people who don't exist in your broadcast audience, the broadcast will fail by default. You can override this behavior by setting the email_ignore_missing and/or id_ignore_missing flags to true. The broadcast will skip over any people who don't exist in your workspace and send to the remaining recipients.
You can reference properties in the data object in your broadcast using liquid—{{trigger.<property_in_data_obj>}}.
By default, we send your broadcast as soon as you trigger it. Set scheduled_at to send it at a future time instead. You can cancel the trigger to stop a scheduled send before it starts sending. You can't change a trigger's scheduled_at value later; if you need to reschedule your broadcast, you must cancel the trigger and re-trigger the broadcast with the new timestamp.
If your broadcast produces a 422 error, you can get more information about the errors to see what went wrong.
This endpoint is rate-limited to one request every 10 seconds. After exceeding this, you'll receive a status of 429. Learn more about API-triggered broadcast limits above.
Broadcasts are optimized to send messages to a large audience and not for one-to-one interactions. Use our transactional API or event-triggered automations to respond to your audience on an individual, one-to-one basis.
- Type: integerbroadcast
_id requiredThe ID of the broadcast that you want to trigger.
Send your broadcast to the default set of recipients defined in the UI.
- Type: objectdata
Contains information you want to use to populate your broadcast.
- Type: booleanemail
_add _duplicates an email address associated with more than one profile id is an error.
- Type: booleanemail
_ignore _missing If false, a missing email causes the broadcast to error and fail. If true, the broadcast will skip over any people in your audience who don't have emails, and continue sending to the rest of your audience.
- Type: integerexpires
_after min:0max:2592000Number of seconds after the send starts that the broadcast should stop sending. Omit or set to
0if you don't want the broadcast to expire. If the broadcast expires before it finishes sending, Customer.io discards the messages that haven't gone out yet instead of delivering them late. The window runs fromscheduled_atwhen you schedule the send, and from the time we receive this request when you don't. - Type: booleanid
_ignore _missing If false, a missing customer ID causes the broadcast to error and fail. If true, the broadcast will skip over any people in your audience who don't have IDs, and continue sending to the rest of your audience.
- Type: integerscheduled
_at min:0max:2147483647Unix timestamp (in seconds) when the broadcast will send. Omit it or set it to
0to send right away. We reject a timestamp more than 5 minutes in the past. Scheduling also changes when we work out your audience:ids,emails,per_user_data, anddata_file_urlset a fixed audience when you make this request, while arecipientsfilter runs when the send fires.
- application/json
- 401
Unauthorized request. Make sure that you provided the right credentials.
- 404
The
broadcast_iddoes not exist. - application/json
{
"data": {
"headline": "Roadrunner spotted in Albuquerque!",
"date": 1511315635,
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!"
},
"email_add_duplicates": false,
"email_ignore_missing": false,
"expires_after": 3600,
"id_ignore_missing": false,
"scheduled_at": 1796128200
}
{
"id": 3
}A successful request returns the trigger ID.