Skip to content

iOS Live Activities API

Apple documentation:

To let a Customer Journey Live Activity point build its content-state form from field names instead of a raw JSON editor, publish a schema for your attributes-type — see the Live Activity Schemas API.

startLiveActivity

Anchor link to

POST https://api.pushwoosh.com/json/1.3/startLiveActivity

Allows creating iOS Live Activities.

Request body

Anchor link to
ParameterTypeRequired/OptionalDescription
applicationStringRequiredPushwoosh application code
authStringRequiredAPI access token from the Pushwoosh Control Panel.
notificationsArrayRequiredJSON array of message parameters. See details in the Notifications table below.

Notifications

Anchor link to

Parameters used in the notifications array:

ParameterTypeRequired/OptionalDescription
contentStringRequired*Alert body for the push that starts the Live Activity, and the fallback text shown on devices running iOS versions below 16.1.
titleStringRequired*Alert title for the push that starts the Live Activity.
live_activityObjectRequiredLive Activity data to create Live Activity in iOS.
live_activity.content-stateObjectRequiredContent for the Live Activity notification.
live_activity.attributes-typeStringRequiredThe type of attributes used in the Live Activity.
live_activity.attributesObjectRequiredAttributes for the Live Activity.
live_activity_idStringRequiredA unique identifier for the Live Activity. Used to target this activity when calling updateLiveActivity. Must be unique per activity session.
filterStringOptionalThe name of a Pushwoosh filter (segment). See Segment / Filter name. The Live Activity will be started on all devices matching this filter.
devicesArray of StringsOptionalA list of device tokens. The Live Activity will be started only on the specified devices.
send_dateStringOptionalSchedules the push that starts the Live Activity for a specific date and time — works with either filter or devices targeting. Use format YYYY-MM-DD HH:mm, or now to start immediately (this is also the default when the parameter is omitted). Must be no more than 1 day in the past or 30 days in the future, otherwise the request is rejected with a validation error.
timezoneStringOptionalThe timezone used to interpret send_date. If omitted, send_date is interpreted in UTC.
apns_priorityIntegerOptionalControls the APNs delivery priority for this Live Activity push. Accepts 10 (high priority, delivered with the apns-priority: 10 header for instant rendering on a locked screen) or 5 (low priority, delivered with apns-priority: 5 to conserve device battery). Any other value is treated as 5, with no validation error. Every Live Activity push defaults to priority 5 regardless of whether it carries alert content (content/title) — set apns_priority: 10 explicitly to request high-priority delivery. See Time Sensitive Push and delivery priority below.

Note: * At least one of content or title must be non-empty. Pushwoosh rejects a start request where both are empty.

Request example

Anchor link to
{
"request": {
"application": "XXXXX-XXXXX",
"auth": "SECRET_API_TOKEN",
"notifications": [
{
"content": "Your order is being prepared",
"title": "Food Delivery",
"apns_priority": 10,
"live_activity": {
"event": "start",
"title": "Order status",
"content-state": {
"status": "Third",
"estimatedTime": "37 min",
"emoji": "👨‍🍳"
},
"attributes-type": "FoodDeliveryAttributes",
"attributes": {}
},
"live_activity_id": "FIRST_LIVE_ACTIVITY",
"filter": "FILTER_NAME_1"
}
]
}
}

Response example

Anchor link to
{
"status_code": 200,
"status_message": "OK",
"response": {
"Messages": [
"XXXXX-XXXXXXXX-XXXXXXXX"
]
}
}

Note:

Read this article to learn more about working with Live Activities using the Pushwoosh iOS SDK.

updateLiveActivity

Anchor link to

POST https://api.pushwoosh.com/json/1.3/updateLiveActivity

Allows updating and ending iOS Live Activities

Request body

Anchor link to
ParameterTypeRequired/OptionalDescription
authStringRequiredAPI access token from the Pushwoosh Control Panel.
applicationStringRequiredPushwoosh application code
notificationsArrayRequiredJSON array of message parameters. See details in the Notifications table below.

Notifications

Anchor link to

Parameters used in the notifications array:

ParameterTypeRequired/OptionalDescription
live_activityObjectRequiredLive Activity data to update Live Activity in iOS.
live_activity.eventStringRequiredSpecifies the event type. Use "update" to update the Live Activity or "end" to close it.
live_activity.content-stateObjectRequiredObject with key-value pairs used to pass data to Live Activity for updating its content.
live_activity.dismissal-dateIntegerOptionalThe time (in seconds) when the Live Activity should end. On an end, omit this to leave the card showing its final content-state until iOS retires it on its own — see the note below. Set a date in the past to remove the card as soon as this update arrives instead.
live_activity_idStringRequiredThe unique identifier of the Live Activity to update. Must match the live_activity_id used in startLiveActivity. The update will be delivered to all devices on which this activity was started.
live_activity.relevance-scoreIntegerOptionalTells the iOS system which Live Activity has higher priority than others. Accepts values from 1 to infinity (values up to 100 are recommended).
live_activity.stale-dateIntegerOptionalThe time (in seconds) that represents the date at which a Live Activity becomes stale, or out of date.
apns_priorityIntegerOptionalControls the APNs delivery priority for this Live Activity push. Accepts 10 (high priority, delivered with the apns-priority: 10 header for instant rendering on a locked screen) or 5 (low priority, delivered with apns-priority: 5 to conserve device battery). Any other value is treated as 5, with no validation error. Every Live Activity push defaults to priority 5 regardless of whether it carries alert content (content/title) — set apns_priority: 10 explicitly to request high-priority delivery. See Time Sensitive Push and delivery priority below.
contentStringOptionalAlert body for this update. The common case is a content-state-only update, which sets none of content, title, or subtitle and carries no alert at all.
titleStringOptionalAlert title for this update. Setting content, title, or subtitle triggers an alert and lets ios_sound play. With none of the three set, the update stays silent, which is the default for content-state-only updates.
subtitleStringOptionalAlert subtitle for this update. Same alert-triggering role as content/title above.
ios_soundStringOptionalSound file name in the app’s main bundle. It rides inside aps.alert alongside content/title/subtitle, not the top-level aps.sound, which ActivityKit ignores for Live Activities, so it only plays when this update also sets at least one of those three. iOS also rate-limits Live Activity alerts on its own. The same payload has been observed to arrive with sound on one delivery and without it on the next, on both device and Simulator.

Note: relevance-score only affects the display order among multiple active Live Activities on the same device — it does not affect delivery urgency. Use apns_priority to control how urgently an update is delivered.

Request example

Anchor link to
{
"request": {
"application": "XXXXX-XXXXX",
"auth": "SECRET_API_TOKEN",
"notifications": [
{
"apns_priority": 10,
"title": "Live Activity Update",
"live_activity": {
"event": "update",
"content-state": {
"status": "second 66",
"estimatedTime": "66 min",
"emoji": "👨‍"
},
"relevance-score": 60
},
"live_activity_id": "FIRST_LIVE_ACTIVITY"
}
]
}
}

Response example

Anchor link to
{
"status_code": 200,
"status_message": "OK",
"response": {
"Messages": [
"XXXXX-XXXXXXXX-XXXXXXXX"
]
}
}

Read this article to learn more about working with Live Activities using the Pushwoosh iOS SDK.

Time Sensitive Push and delivery priority

Anchor link to

By default, Apple delivers Live Activity updates at low priority (apns-priority: 5) to conserve battery. When a device is locked, a low-priority update is processed in the background and only becomes visible on the Lock Screen once the user unlocks the device. On an already-unlocked device it still renders instantly. Use the apns_priority parameter described above to request high-priority (apns-priority: 10) delivery so the update renders on the Lock Screen immediately, without unlocking.

Even with apns_priority: 10 available, Apple caps how often it can be used.

Multiple activities per device

Anchor link to

You can start multiple Live Activities on the same device by calling startLiveActivity several times with different live_activity_id values.

For example, if you start two activities: FIRST_LIVE_ACTIVITY with filter: FILTER_NAME_1 and SECOND_LIVE_ACTIVITY with filter: FILTER_NAME_2, a device that matches both filters will have both activities running simultaneously.

To update one of them, pass its live_activity_id to updateLiveActivity. The update is delivered to all devices where that activity was created. The other activity is not affected.

The relevance-score parameter controls display priority when multiple Live Activities are active on the same device. If screen space is limited or activities are grouped, the activity with a higher value is shown with higher priority.