Live Activity Schemas API
Este contenido aún no está disponible en su idioma.
A Live Activity schema is a JSON Schema for one content-state shape — the fields a specific ActivityAttributes type in your app declares (for example FlightAttributes). Publish a schema so a Customer Journey Live Activity point can build its content-state form from the field names and types, instead of a raw JSON editor. The card and its layout are still built in your app’s code. The schema only describes the data a journey fills in.
This API is for developers integrating Live Activities. See the iOS Live Activities API for starting and updating activities themselves.
Base URL
Anchor link tohttps://rpc-api.svc-nue.pushwoosh.comAuthentication
Anchor link toEvery request must include an Authorization header with your Server API token:
Authorization: Api YOUR_API_TOKENConventions
Anchor link to- Field naming is asymmetric. Requests accept both
lowerCamelCaseand the proto name. Responses always come back with the proto field names, insnake_case(attributes_type,json_schema) — the examples below use that casing. - Versions are immutable. A published version can’t be edited — there is no
Updatemethod. Publishing again with the sameattributesTypeandversionfails withAlreadyExists. A widget change is always a new version. OmitversiononCreateto publish the next free one for thatattributesType. jsonSchemaformat: must be a JSON object with"type": "object", up to 64 KB.null, a number, a bare string, or an object missing"type": "object"are all rejected — the form Pushwoosh builds needs named fields, which only an object schema has.
Endpoints
Anchor link to| Method | Path | Description |
|---|---|---|
GET | /api/live_activity_schemas | List an application’s schemas |
GET | /api/live_activity_schemas/{attributesType}/{version} | Get one schema version |
POST | /api/live_activity_schemas | Publish a new schema version |
DELETE | /api/live_activity_schemas/{attributesType}/{version} | Delete a schema version |
List
Anchor link toLists every attributesType an application has published schemas for, with all their versions, newest version first.
GET /api/live_activity_schemas
Query parameters
Anchor link to| Parameter | Type | Required | Description |
|---|---|---|---|
application | string | Yes | The application code to list schemas for. |
attributesType | string | No | Restrict the list to one ActivityAttributes type. |
Response example
Anchor link to{ "schemas": [ { "application": "XXXXX-XXXXX", "attributes_type": "FlightAttributes", "version": 2, "json_schema": "{\"type\":\"object\",\"properties\":{\"gate\":{\"type\":\"string\"}}}", "created": "2026-09-01T10:00:00Z", "updated": "2026-09-01T10:00:00Z" }, { "application": "XXXXX-XXXXX", "attributes_type": "FlightAttributes", "version": 1, "json_schema": "{\"type\":\"object\",\"properties\":{\"gate\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}", "created": "2026-08-15T10:00:00Z", "updated": "2026-08-15T10:00:00Z" } ]}Returns one schema version.
GET /api/live_activity_schemas/{attributesType}/{version}
Path parameters
Anchor link to| Parameter | Type | Required | Description |
|---|---|---|---|
attributesType | string | Yes | Name of the ActivityAttributes type. |
version | integer | Yes | Schema version. |
Query parameters
Anchor link to| Parameter | Type | Required | Description |
|---|---|---|---|
application | string | Yes | The application code the schema belongs to. |
Response
Anchor link toReturns { "schema": { ... } }, the schema object shown in List above.
Create
Anchor link toPublishes a new schema version for an attributesType. Returns the created schema, including the version it was assigned.
POST /api/live_activity_schemas
Request body
Anchor link to| Parameter | Type | Required | Description |
|---|---|---|---|
application | string | Yes | The application code to publish the schema in. |
attributesType | string | Yes | Name of the ActivityAttributes type declared in your app. |
jsonSchema | string | Yes | JSON Schema of the content-state fields — see the format rule in Conventions above. |
version | integer | No | Version to publish. Omit to get the next free version for this attributesType. |
Request example
Anchor link to{ "application": "XXXXX-XXXXX", "attributesType": "FlightAttributes", "jsonSchema": "{\"type\":\"object\",\"properties\":{\"gate\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}"}Response
Anchor link toReturns { "schema": { ... } }, the created schema object.
Delete
Anchor link toPermanently deletes one schema version.
DELETE /api/live_activity_schemas/{attributesType}/{version}
Path parameters
Anchor link to| Parameter | Type | Required | Description |
|---|---|---|---|
attributesType | string | Yes | Name of the ActivityAttributes type. |
version | integer | Yes | Schema version to delete. |
Query parameters
Anchor link to| Parameter | Type | Required | Description |
|---|---|---|---|
application | string | Yes | The application code the schema belongs to. |
Response
Anchor link toReturns an empty object on success.
Error responses
Anchor link to| HTTP status | Meaning |
|---|---|
400 Bad Request | Invalid argument — a required field is missing, jsonSchema fails the format rule above, or jsonSchema exceeds 64 KB. |
401 Unauthorized | Missing or invalid Authorization header. |
403 Forbidden | The application does not belong to the caller’s account. |
404 Not Found | The application, or the attributesType/version pair, was not found. |
409 Conflict | Create was called with an attributesType/version pair that already exists (AlreadyExists on the wire). |
500 Internal Server Error | Unexpected server-side failure. |
Managing schemas in the Control Panel
Anchor link toAn application’s settings also have a Live Activity schemas screen with the same actions: list versions by type, publish a new version, view a version’s JSON, and delete a version (with a confirmation, since deletion is permanent).