---
title: "Patch PAL"
method: PATCH
path: "/v2/pals/{pal_id}"
tags: ["PALs"]
---

# Patch PAL

`PATCH /v2/pals/{pal_id}`

Update specific fields of a PAL using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) operations.

### Draft vs live routing

If the PAL has an active [PAL Builder](https://maker.tavus.io/dev) draft, this endpoint **routes to the draft by default**. Live conversations, deployments, and public reads continue to use the previously-published version until you publish (`POST /v2/pals/{pal_id}/publish`) or repeat the request with `?target=live`. PALs without an active draft are unaffected — the patch applies to the live row as it always did.

This default was introduced so an API patch and a PAL Maker edit stay in sync: the Builder reads the draft row, so a PATCH that skipped the draft would produce an editor that still shows the pre-patch state. To bypass the draft, pass `?target=live` — this applies the edit to the live row and resyncs the retained draft from live. Any unpublished draft edits are discarded.

The response always includes `edit_target`, `edited_pal_id`, `live_pal_id`, `draft_pal_id`, and `routing_message` so you can confirm which row was written. Draft-routed responses also include `publish_url`. See [Draft vs live PALs](/sections/conversational-video-interface/pal/draft-and-live) for the full model.

### `layers.conferencing` is live-owned

`layers.conferencing` (the conferencing/Google Meet integration) is deployment config that lives on the live row so meeting invitations continue to work while a draft is open. Regardless of `?target`, any patch that touches `layers.conferencing` (or removes `layers`) is applied to the live PAL and then synced into the open draft, so the draft never carries a stale conferencing config. Consequences:

- `?target=draft` with a conferencing op returns `400`.
- A single request cannot mix conferencing ops with edits to other fields — split the request in two.
- Publishing a stale draft never wipes deployed conferencing config; live conferencing is preserved.

## Query parameters

- `target` 'draft' | 'live'

## Request body

- object[]
  - `op` 'add' | 'remove' | 'replace' | 'copy' | 'move' | 'test', required — The operation to perform. Must be one of: add, remove, replace, copy, move, test
  - `path` string, required — JSON Pointer (RFC 6901) to a location in the PAL document. Paths must match the **current** document shape-compare the response from [Get PAL](/api-reference/pals/get-pal) (`GET /v2/pals/{pal_id}`) before patching.
  - `value` string, required — The value to be used within the operation. **This field is not required for the `remove` operation**.

## Response `200`

The patched PAL body. In addition to the usual PAL fields, the response includes routing metadata so you can confirm which row was written.

- object
  - `pal_id` string — The PAL id you called the endpoint with — always echoed back unchanged, even when the patch was routed to the draft or to live. Safe to persist on the client.
  - `edited_pal_id` string — The id of the row that was actually written. Equals `live_pal_id` when the patch went to live and `draft_pal_id` when it went to the draft.
  - `edit_target` 'draft' | 'live' — Which row this PATCH wrote to. `draft` when the request landed on an active PAL Builder draft (the default when one exists); `live` when it landed on the live PAL — either because no draft exists, `?target=live` was passed, or the patch touched `layers.conferencing`.
  - `live_pal_id` string — The id of the live PAL. Same as `pal_id` when you called this endpoint with the live id.
  - `draft_pal_id` string, nullable — The id of the active draft row, or `null` when no draft exists.
  - `publish_url` string — Present when the patch was routed to a draft. POST to this path to make the draft live.
  - `routing_message` string — Human-readable summary of where the edit went and how live/draft are related after the patch. Useful to surface in logs when auditing writes.

## Other responses

- `304` — No changes were made to the PAL
- `400` — Bad Request. Common draft-routing causes: - `target` is not `draft` or `live`. - `?target=draft` was passed with a patch op that touches `layers.conferencing` (conferencing is live-owned). - A single request mixes `layers.conferencing` ops with edits to other fields — split into two requests.
- `422` — Invalid JSON patch format

---

[API](https://skmtc.net/tavus/apis/tavus-developer-api-collection.md) · [All operations](https://skmtc.net/tavus/apis/tavus-developer-api-collection/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tavus/tavus-developer-api-collection/versions/c878e2f6508d/schema)
