PATCH
/
v2
/
guardrails
/
{guardrails_id}
curl --request PATCH \
--url https://tavusapi.com/v2/guardrails/{guardrails_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '[
{
"op": "replace",
"path": "/data/0/guardrails_name",
"value": "Updated Compliance Guardrails"
}
]'
{
  "message": "Guardrails updated successfully"
}
  • Ensure the path field matches the current guardrails schema.
  • For the remove operation, the value parameter is not required.

Authorizations

x-api-key
string
header
required

Path Parameters

guardrails_id
string
required

The unique identifier of the guardrails.

Example:

"g12345"

Body

application/json · object[]
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:

"replace"

path
string
required

A JSON Pointer string that references a location within the target document where the operation is performed

Example:

"/guardrails_name"

value
any

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

Response

Guardrails updated successfully

message
string

Success message

Example:

"Guardrails updated successfully"