# Live Activity Schemas API

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](/developer/api-reference/customer-journey-api/) 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](/developer/api-reference/ios-live-activities-api/) for starting and updating activities themselves.

## Base URL

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

## Authentication

Every request must include an `Authorization` header with your [Server API token](/developer/api-reference/api-access-token/#server-api-token):

```
Authorization: Api YOUR_API_TOKEN
```

## Conventions

* **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.

## Endpoints

| 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

Lists every `attributesType` an application has published schemas for, with all their versions, newest version first.

`GET` `/api/live_activity_schemas`

### Query parameters

| Parameter | Type | Required | Description |
| :---- | :---- | :---- | :---- |
| `application` | string | Yes | The [application code](/developer/api-reference/api-identifiers/#application-code) to list schemas for. |
| `attributesType` | string | No | Restrict the list to one `ActivityAttributes` type. |

##### Response example

```json
{
  "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"
    }
  ]
}
```

## Get

Returns one schema version.

`GET` `/api/live_activity_schemas/{attributesType}/{version}`

### Path parameters

| Parameter | Type | Required | Description |
| :---- | :---- | :---- | :---- |
| `attributesType` | string | Yes | Name of the `ActivityAttributes` type. |
| `version` | integer | Yes | Schema version. |

### Query parameters

| Parameter | Type | Required | Description |
| :---- | :---- | :---- | :---- |
| `application` | string | Yes | The application code the schema belongs to. |

### Response

Returns `{ "schema": { ... } }`, the schema object shown in [List](#list) above.

## Create

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

| 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](#conventions) above. |
| `version` | integer | No | Version to publish. Omit to get the next free version for this `attributesType`. |

##### Request example

```json
{
  "application": "XXXXX-XXXXX",
  "attributesType": "FlightAttributes",
  "jsonSchema": "{\"type\":\"object\",\"properties\":{\"gate\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}"
}
```

### Response

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

<Aside type="caution">
Publishing an `attributesType`/`version` pair that already exists fails with `AlreadyExists` — versions are immutable, so there's no way to overwrite one. Publish without `version` to get the next one instead.
</Aside>

## Delete

Permanently deletes one schema version.

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

### Path parameters

| Parameter | Type | Required | Description |
| :---- | :---- | :---- | :---- |
| `attributesType` | string | Yes | Name of the `ActivityAttributes` type. |
| `version` | integer | Yes | Schema version to delete. |

### Query parameters

| Parameter | Type | Required | Description |
| :---- | :---- | :---- | :---- |
| `application` | string | Yes | The application code the schema belongs to. |

### Response

Returns an empty object on success.

<Aside type="danger">
This cannot be undone. A journey's Live Activity point built against the deleted version keeps its already-saved content-state fields — it just loses the form hints, and shows a raw JSON editor for that field set from then on.
</Aside>

### Error responses

| 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

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