Skip to main content
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/guardrail_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
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:

"/guardrail_name"

value
any

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

Example:

"Updated Compliance Guardrails"

Response

Guardrails updated successfully

message
string

Success message

Example:

"Guardrails updated successfully"