Update Live Activity
Update or terminate running iOS Live Activities using OneSignal’s Live Activities API. This endpoint enables real-time content updates and activity termination, ensuring dynamic, context-aware user experiences.
Overview
Update or terminate running iOS Live Activities using our REST API. This endpoint enables real-time content updates and activity termination, ensuring dynamic, context-aware user experiences.
Before using this API, ensure your app is properly configured by following the Live Activities developer setup.
How to Use this API
- Select the Live Activity to update by specifying its
activity_id
in the URL. This is set when using the:
-
Update the state of the Live Activity by setting the
event_updates
parameter to a JSON object that matches the structure of theActivityAttributes.ContentState
struct defined in your Live Activity widget extension. -
When ready to terminate the Live Activity, set the
event
parameter to\"end\"
and include adismissal_date
if you want the Live Activity to be dismissed in less than 4 hours.
Path Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
An identifier you set when starting the Live Activity to uniquely identify it and associated devices with the event. This value is crucial for maintaining a consistent reference to the Live Activity across different devices and sessions. Consider using a UUID, CUID, or NanoID for this parameter.
Body
Response
201
The response is of type object
.