Send Messages

Send an API-triggered broadcast

Changed on

Trigger a broadcast and optionally provide data to populate liquid placeholders in the message. To trigger one-time send broadcasts, use the one-time send endpoint.

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.

Define your audience

The shape of the request depends on how you define your audience: default (the recipients set in the UI), custom conditions, a list of emails, a list of customer IDs, a map of users, or a data file.

You can narrow any of these audiences, except the default audience, with the filter object. This is useful when a file or a list of people is broader than the audience you want for your broadcast.

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>}}.

Send or schedule your broadcast

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. If you need to trigger broadcasts more often, contact us to talk through your use case.

post/v1/campaigns/{broadcast_id}/triggers

Request

  • Base URL
    https://api.customer.io
  • URL
    https://api.customer.io/v1/campaigns/{broadcast_id}/triggers
  • Auth
    HTTP bearer

Request body

OR
OR
OR
OR
OR

Example request

{
  "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!"
  },
  "scheduled_at": 1796128200,
  "expires_after": 3600,
  "rate_limit": {
    "rate": 1000,
    "period": "hour"
  }
}

Response

A successful request returns the trigger ID.

idinteger

The trigger_id for this operation. You can use this ID to get the status of your broadcast or check for errors.

Example response

{
  "id": 3
}

Changes

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • info

      added the new optional request property ///////

    • info

      added the new optional request property ////////////

    • info

      added the new optional request property ////////////

    • info

      added the new optional request property ////////////

    • info

      added the new optional request property ////////////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property ///////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property ///////

    • info

      added the new optional request property ////////////

    • info

      added the new optional request property ////////////

    • info

      added the new optional request property ////////////

    • info

      added the new optional request property ////////////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property ///////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ////////

    • info

      added the new optional request property /////////////

    • info

      added the new optional request property /////////////

    • info

      added the new optional request property /////////////

    • info

      added the new optional request property /////////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ////////

    • info

      added the new optional request property /////////////

    • info

      added the new optional request property /////////////

    • info

      added the new optional request property /////////////

    • info

      added the new optional request property /////////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ////////

    • info

      added the new optional request property //////

    • info

      added the new optional request property //////

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////