Pular para o conteúdo

Live Activity Schemas API

Este conteúdo ainda não está disponível no seu 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.

https://rpc-api.svc-nue.pushwoosh.com

Authentication

Anchor link to

Every request must include an Authorization header with your Server API token:

Authorization: Api YOUR_API_TOKEN

Conventions

Anchor link to
  • Field naming is asymmetric. Requests accept both lowerCamelCase and the proto name. Responses always come back with the proto field names, in snake_case (attributes_type, json_schema) — the examples below use that casing.
  • Versions are immutable. A published version can’t be edited — there is no Update method. Publishing again with the same attributesType and version fails with AlreadyExists. A widget change is always a new version. Omit version on Create to publish the next free one for that attributesType.
  • jsonSchema format: 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.
MethodPathDescription
GET/api/live_activity_schemasList an application’s schemas
GET/api/live_activity_schemas/{attributesType}/{version}Get one schema version
POST/api/live_activity_schemasPublish a new schema version
DELETE/api/live_activity_schemas/{attributesType}/{version}Delete a schema version

Lists 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
ParameterTypeRequiredDescription
applicationstringYesThe application code to list schemas for.
attributesTypestringNoRestrict 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
ParameterTypeRequiredDescription
attributesTypestringYesName of the ActivityAttributes type.
versionintegerYesSchema version.

Query parameters

Anchor link to
ParameterTypeRequiredDescription
applicationstringYesThe application code the schema belongs to.

Returns { "schema": { ... } }, the schema object shown in List above.

Publishes 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
ParameterTypeRequiredDescription
applicationstringYesThe application code to publish the schema in.
attributesTypestringYesName of the ActivityAttributes type declared in your app.
jsonSchemastringYesJSON Schema of the content-state fields — see the format rule in Conventions above.
versionintegerNoVersion 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\"}}}"
}

Returns { "schema": { ... } }, the created schema object.

Permanently deletes one schema version.

DELETE /api/live_activity_schemas/{attributesType}/{version}

Path parameters

Anchor link to
ParameterTypeRequiredDescription
attributesTypestringYesName of the ActivityAttributes type.
versionintegerYesSchema version to delete.

Query parameters

Anchor link to
ParameterTypeRequiredDescription
applicationstringYesThe application code the schema belongs to.

Returns an empty object on success.

Error responses

Anchor link to
HTTP statusMeaning
400 Bad RequestInvalid argument — a required field is missing, jsonSchema fails the format rule above, or jsonSchema exceeds 64 KB.
401 UnauthorizedMissing or invalid Authorization header.
403 ForbiddenThe application does not belong to the caller’s account.
404 Not FoundThe application, or the attributesType/version pair, was not found.
409 ConflictCreate was called with an attributesType/version pair that already exists (AlreadyExists on the wire).
500 Internal Server ErrorUnexpected server-side failure.

Managing schemas in the Control Panel

Anchor link to

An 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).