Send transactional web push

New

Create a transactional web push message and use the App API to send it to a person's browsers.

Set up web push before you create a message so the people you want to reach can subscribe on your website.

Create a transactional web push message

  1. In Transactional, click Create message. Name your message and continue to the content step.
  2. Select Web Push and add your content. Choose a Design Studio web push message, or create one, as described in write your notification.
  3. Choose which browsers receive it. Use Website to limit the message to one site’s browsers, or leave it on All websites.
  4. Preview and send a test, then save your content.
  5. Configure your message settings. You can set a Trigger name to use in place of the message ID.
  6. In Review, send an API request to test the integration, then click Activate.
The content step of a transactional message with Web Push selected as the channel and an Order shipped notification as its content

Send with the API

Send a request to POST /v1/send/web_push. Use https://api.customer.io for US accounts or https://api-eu.customer.io for EU accounts. Until you generate your web push keys for the workspace, requests return 400 Bad Request with Web push is not set up for this workspace.

These fields work the same way as in the transactional push request: transactional_message_id, identifiers, message_data, title, image_url, link, send_at, language, queue_draft, disable_message_retention, and send_to_unsubscribed. For to, message, custom_data, auto_create, and custom_device, follow the rules after the example below. They differ from the push reference. Browsers don’t use platform, sound, or custom_payload, so the request ignores them.

This request sends to the person’s most recently used eligible browser. It uses an existing message with the trigger name booking_confirmed, or creates one if that name is unused.

BASH
curl --request POST \
  --url https://api.customer.io/v1/send/web_push \
  --header "Authorization: Bearer $APP_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "transactional_message_id": "booking_confirmed",
    "auto_create": true,
    "identifiers": { "id": "user_123" },
    "to": "last_used",
    "title": "Your booking is confirmed",
    "message": "Your room is ready.",
    "link": "https://www.example.com/bookings/8812"
  }'
  • to selects which eligible browsers receive the message. Use all for every eligible browser, last_used for the most recently used eligible browser, or a browser’s subscription endpoint to send to that browser. If you leave it out, the send uses the message’s Browsers (or To) setting. A message you create in Customer.io sends to all eligible browsers until you change that setting. If the endpoint you send isn’t one of the person’s eligible browsers, the request still returns 200, and the delivery is undeliverable.
  • message replaces the message’s text for this send, so it can’t be blank.
  • Set auto_create to true and use a trigger name as transactional_message_id to create a web push message when the name doesn’t match an existing message. A new message has no text of its own, so include message in every request until you add text to the message in Customer.io. A request for a message with saved text can leave out message to use that text.
  • custom_data must be an object whose values are all strings. A request with any other value, like a number or a nested object, returns 400 Bad Request. If you send null, the message’s own custom data is used.
  • custom_device adds or updates a browser on the person’s profile before the send. Set its platform to web and its token to the browser’s subscription endpoint, an https:// URL of up to 512 characters. Set its webpush_p256dh and webpush_auth attributes to the subscription’s keys, as the browser gives them in subscription.toJSON(). If one of these is invalid, the error names the field as device.token or device.attributes.webpush_p256dh, for example. The send still goes to the browsers that to selects. To send only to this browser, set to to the same endpoint.

A successful request returns 200 with a delivery_id and the time Customer.io queued the message, queued_at. A scheduled request also returns send_at.

Metrics

Transactional web push appears under the web push channel in reports. See what each delivery status means.

The Sent tab of a transactional web push message, with one delivery to Maya marked Delivered
Updated November 24, 2026