Skip to main content
PATCH
Update a guardrail

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Path Parameters

id
string<uuid>
required

The unique identifier of the guardrail to update

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json
allowed_models
string[] | null

Array of model identifiers (slug or canonical_slug accepted)

Minimum array length: 1
Example:
allowed_providers
string[] | null

New list of allowed provider IDs

Minimum array length: 1
Example:
content_filter_builtins
object[] | null

Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only.

Example:
content_filters
object[] | null

Custom regex content filters to apply. Set to null to remove.

Example:

null

description
string | null

New description for the guardrail

Maximum string length: 1000
Example:

"Updated description"

enforce_zdr
boolean | null
deprecated

Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.

Example:

true

enforce_zdr_anthropic
boolean | null

Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.

Example:

true

enforce_zdr_google
boolean | null

Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.

Example:

true

enforce_zdr_openai
boolean | null

Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.

Example:

true

enforce_zdr_other
boolean | null

Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.

Example:

true

enforce_zdr_xai
boolean | null

Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.

Example:

true

ignored_models
string[] | null

Array of model identifiers to exclude from routing (slug or canonical_slug accepted)

Minimum array length: 1
Example:
ignored_providers
string[] | null

List of provider IDs to exclude from routing

Minimum array length: 1
Example:
limit_usd
number<double> | null

New spending limit in USD

Example:

75

name
string

New name for the guardrail

Required string length: 1 - 200
Example:

"Updated Guardrail Name"

reset_interval
enum<string> | null

Interval at which the limit resets (daily, weekly, monthly)

Available options:
daily,
weekly,
monthly,
null
Example:

"monthly"

Response

Guardrail updated successfully

data
object
required

The updated guardrail

Example: