v1.0.0
OpenAPI 3.1.0

End a live notification

US region

Client Libraries

End a live notification

End a running activity, referenced by its instance_id. On iOS, the system dismisses the activity from the Lock Screen. On Android, the SDK normally renders the final content as a non-ongoing notification; it cancels the notification only when there's no final notification to render. You can include a final content_state to show before the activity ends.

push_payload is optional on the end call, 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.

Body
application/json
  • instance_id
    Type: string
    required

    The activity's instance ID (ULID), returned when you started it.

  • attributes
    Type: object

    Static activity fields, for renderers that need them alongside the content state.

  • content_state

    The final content state to show before the activity ends. Defaults to the last state you sent. 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.

    Your own dynamic fields. On iOS, field names must match your ContentState type. For Android custom types, fields pass through to your app's renderer as-is. Date fields are epoch seconds.

    • propertyName
      Type: anything
  • Type: string

    A link to open when the person taps the activity.

  • push_payload
    Type: object

    The alert to accompany the end event. Optional whether Customer.io delivers directly through APNs or relays through Firebase Cloud Messaging (FCM). If you include an alert, provide both its title and body.

Responses
  • application/json
  • 400

    The request was malformed, instance_id isn't a valid ULID, or a push_payload.alert was missing a title or body.

  • 404

    Live notifications aren't enabled for this workspace.

Request Example for post/v1/live_notifications/end
curl https://api.customer.io/v1/live_notifications/end \
  --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"
}