Skip to main content
PATCH
For AI agents, use https://docs.tavus.io/openapi.yaml for the full HTTP API contract.
If the PAL has an active PAL Builder draft, this endpoint writes to the draft by default — live conversations are unaffected until you call Publish PAL. Draft-routed responses include a publish_url. Pass ?target=live to write directly to live, discard unpublished edits, and resync the retained draft. layers.conferencing is always live-owned. See Draft vs live PALs.

Authorizations

x-api-key
string
header
required

Path Parameters

pal_id
string
required

The unique identifier of the PAL.

Example:

"pcb7a34da5fe"

Query Parameters

target
enum<string>

Which row to write to when the PAL has an active PAL Builder draft.

  • Omitted (default): writes to the draft if one exists, otherwise to live. Live traffic is unchanged until you publish.
  • draft: same as the default. Rejected with 400 if the patch touches layers.conferencing.
  • live: writes directly to the live PAL and resets the draft to match, so live becomes the single source of truth. Any unpublished draft edits are discarded.

For layers.conferencing, omit target or pass target=live. Explicit target=draft is rejected because conferencing is live-owned.

Available options:
draft,
live

Body

application/json
op
enum<string>
required

The operation to perform. Must be one of: add, remove, replace, copy, move, test

Available options:
add,
remove,
replace,
copy,
move,
test
Example:

"add"

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 (GET /v2/pals/{pal_id}) before patching.

Example:

"/layers/llm/model"

value
string
required

The value to be used within the operation. This field is not required for the remove operation.

Example:

"tavus-llama-4"

Response

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

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.

Example:

"pcb7a34da5fe"

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.

Example:

"p5f1e8d2a934"

edit_target
enum<string>

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.

Available options:
draft,
live
Example:

"draft"

live_pal_id
string

The id of the live PAL. Same as pal_id when you called this endpoint with the live id.

Example:

"pcb7a34da5fe"

draft_pal_id
string | null

The id of the active draft row, or null when no draft exists.

Example:

"p5f1e8d2a934"

publish_url
string

Present when the patch was routed to a draft. POST to this path to make the draft live.

Example:

"/v2/pals/pcb7a34da5fe/publish"

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.

Example:

"Edited the Builder draft (p5f1e8d2a934). The live PAL (pcb7a34da5fe) is unchanged and will not reflect these edits until you publish. To edit the live PAL directly, re-send with ?target=live (this discards unpublished draft edits and resyncs the draft from live)."