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>"
}{
"error": "Invalid patch operation"
}{
"message": "Invalid access token"
}Guardrails
Patch Guardrails
Update specific fields of a guardrail using JSON Patch operations. Paths must match the current document shape - compare against the response from Get Guardrails before patching.
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>"
}{
"error": "Invalid patch operation"
}{
"message": "Invalid access token"
}For AI agents, use
https://docs.tavus.io/openapi.yaml for the full HTTP API contract.Authorizations
Path Parameters
The unique identifier of the guardrail.
Example:
"g1234567890ab"
Body
application/json
Available options:
add, remove, replace, copy, move, test Example:
"replace"
JSON Pointer (RFC 6901) to a field on the guardrail (e.g. /guardrail_prompt, /tags, /modality).
Example:
"/guardrail_prompt"
The value used by the operation. Not required for remove.
Example:
"Updated prompt with stricter restrictions."

