Skip to main content
PATCH
/
v2
/
guardrails
/
{guardrail_id}
curl --request PATCH \ --url https://tavusapi.com/v2/guardrails/{guardrail_id} \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data ' [ { "op": "replace", "path": "/guardrail_prompt", "value": "Never discuss competitor products under any circumstances." } ] '
{
  "uuid": "g1234567890ab",
  "guardrail_name": "<string>",
  "guardrail_prompt": "<string>",
  "modality": "<string>",
  "callback_url": "<string>",
  "tags": [
    "<string>"
  ],
  "app_message": true,
  "updated_at": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.tavus.io/llms.txt

Use this file to discover all available pages before exploring further.

For AI agents, use https://docs.tavus.io/openapi.yaml for the full HTTP API contract.

Authorizations

x-api-key
string
header
required

Path Parameters

guardrail_id
string
required

The unique identifier of the guardrail.

Example:

"g1234567890ab"

Body

application/json
op
enum<string>
required
Available options:
add,
remove,
replace,
copy,
move,
test
Example:

"replace"

path
string
required

JSON Pointer (RFC 6901) to a field on the guardrail (e.g. /guardrail_prompt, /tags, /modality).

Example:

"/guardrail_prompt"

value
any

The value used by the operation. Not required for remove.

Example:

"Updated prompt with stricter restrictions."

Response

Guardrail updated successfully

uuid
string
Example:

"g1234567890ab"

guardrail_name
string
guardrail_prompt
string
modality
string
callback_url
string
tags
string[]
app_message
boolean

Whether triggering this guardrail emits a real-time app-message event on the conversation.

updated_at
string