Update a live notification
Push a new content state to a running activity, referenced by its instance_id. The device re-renders the activity from the state you send.
Send the full content state on every update, not just the fields that changed—the platforms don't support partial updates.
push_payload is optional on updates, whether Customer.io delivers directly through APNs or relays through Firebase Cloud Messaging (FCM). If you include a push_payload.alert, it must contain both a title and a body.
- content
_state requiredThe complete new content state for the activity. The content state's shape depends on the activity's
notification_type. For iOS or a free form Android activity, pick the free form variant. For other Android notification types, pick the matching variant below. Date fields are epoch seconds.Your own dynamic fields. On iOS, field names must match your
ContentStatetype. For Android custom types, fields pass through to your app's renderer as-is. Date fields are epoch seconds.- propertyType: anything
Name
- Type: stringinstance
_id requiredThe activity's instance ID (ULID), returned when you started it.
- Type: objectattributes
Static activity fields, for renderers that need them alongside the content state. On iOS, attributes can't change after start.
- Type: stringdeep
_link A link to open when the person taps the activity.
- Type: objectpush
_payload The alert to accompany the update. Optional whether Customer.io delivers directly through APNs or relays through Firebase Cloud Messaging (FCM). If you include an alert, provide both its
titleandbody.
- application/json
- 400
The request was malformed,
instance_idisn't a valid ULID, or apush_payload.alertwas missing atitleorbody. - 404
Live notifications aren't enabled for this workspace.
curl https://api.customer.io/v1/live_notifications/update \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"instance_id": "",
"content_state": {
"additionalProperty": "anything"
},
"attributes": {
"additionalProperty": "anything"
},
"push_payload": {
"alert": {
"title": "",
"body": "",
"sound": ""
}
},
"deep_link": ""
}'
{
"instance_id": "string"
}The update was queued.