iOS Live Activities API
Manage iOS Live Activities via API
startLiveActivity
Use this method to create iOS Live Activities.
POST
https://api.pushwoosh.com/json/1.3/startLiveActivity
Allows to create iOS Live Activities.
Request body
Parameter | Type | Required/Optional | Description |
---|---|---|---|
application | String | Required | Pushwoosh application code. |
auth | String | Required | API access token from the Pushwoosh Control Panel. |
notifications | Array | Required | JSON array of message parameters. See details in the Notifications table below. |
Notifications
Parameters used in the notifications array.
Parameter | Type | Required/Optional | Description |
---|---|---|---|
live_activity | Object | Required | Live Activity data to create Live Activity in iOS. |
content-state | Object | Required | Content for the Live Activity notification. |
attributes-type | String | Required | The type of attributes used in the Live Activity. |
attributes | Object | Required | Attributes for the Live Activity. |
live_activity_id | String | Required | A unique ID for the Live Activity, created by the user. |
filter_code | String | Optional | Filter (Segment) code to target specific audience segments. |
devices | Array of strings | Optional | Tokens or HWIDs to send targeted push notifications, with a maximum of 1,000 tokens or HWIDs per array. If set, the message will be sent only to the devices in the list. Note: the Application Group for the devices list is not allowed, and iOS push tokens must be in lowercase. |
users | Array of strings | Optional | If set, the message will only be delivered to the specified user IDs (assigned via the /registerUser call). You can include up to 1000 User IDs in the array. Application Group for the users list is not allowed. Note: If used together with the devices parameter, the devices parameter will be ignored. |
Request example
updateLiveActivity
Use this method to manage iOS Live Activities.
POST
https://api.pushwoosh.com/json/1.3/updateLiveActivity
Allows to create and manage iOS Live Activities.
Request Body
Parameter | Type | Required/Optional | Description |
---|---|---|---|
auth | String | Required | API access token from the Pushwoosh Control Panel. |
application | String | Required | The Pushwoosh application code |
notifications | Array | Required | JSON array of message parameters. See details in the Notifications table below. |
Notifications
Parameters used in the notifications array.
Parameter | Type | Required/Optional | Description |
---|---|---|---|
live_activity | Object | Required | Live Activity data to update Live Activity in iOS. |
event | String | Required | Specifies the event type. Use "update" to update the Live Activity or "end" to close it. |
content-state | Object | Required | Object with key-value pairs used to pass data to Live Activity for updating its content. |
dismissal-date | Integer | Optional | The time (in seconds) when the Live Activity should end. |
live_activity_id | String | Required | A unique identifier for the Live Activity being updated. |
Request example
Read this article to learn more about working with Live Activities using the Pushwoosh iOS SDK.
Last updated