Remotely start a Live Activity on iOS devices via OneSignal’s REST API. Define the activity type, target users, and send dynamic, updatable content directly to a Live Activity interface.
activity_type
parameter to specify the type of the Live Activity UI to use.activity_id
to track and manage your Live Activity.event_attributes
parameter to initialize the Live Activity with static data.event_updates
parameter to update the Live Activity with dynamic content.activity_id
activity_id
to track and manage the Live Activity. 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.
activity_id
is unique and consistently used for each Live Activity to avoid conflicts and ensure accurate tracking.
event_attributes
to initialize the Live Activityevent_updates
for dynamic contentContentState
interface defined within your app’s Live Activity. See Live Activities developer setup.
Ensure that the event_updates
object matches the ContentState
interface exactly as defined in your Live Activity implementation. Inconsistencies can cause Live Activities to fail to display.
Your App API key with prefix Key
. See Keys & IDs.
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The name of the Live Activity defined in your app. This should match the your-nameAttributes
struct used in your app code. See Live Activities developer setup. Example: If your app defines a Live Activity as OneSignalWidgetAttributes
, then activity_type
should be OneSignalWidgetAttributes
.
201
The response is of type object
.