Update a guardrail
/v1/guardrails/{slug}Update a guardrail.
Changes the fields present in the body; checks, when present, replaces the whole list. Requests that apply the guardrail use the new version within a minute. Requires an admin of the guardrail's workspace, or an organization admin.
Errors: 400 and 402 for checks, as on create; 403 without access; 404 when the guardrail does not exist.
Authorization
AuthorizationBearer va_A platform API key (
va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.
Path parameters
slugstringrequiredthe guardrail's slug
Query parameters
organizationstringrequiredslug of the organization that owns it
Request body application/json
the fields to change
namestringNew display name.
descriptionstringNew description.
enabledbooleantrueto run the guardrail,falseto skip it.checksobject[]The full new list of checks, replacing all current ones. Validated as on create.
Child attributes
typestringrequiredThe validator's id, from
GET /v1/guardrail-validators, for examplePII_DETECTOR,REGEX_MATCH,banned_wordsorprompt_injection. An unknown id is a 400. A validator of kindLLM_JUDGEneeds a plan with AI guardrails (402 otherwise).targetenum<string>requiredWhere the check runs:
INPUT(the request's messages, before the provider is called),OUTPUT(the provider's answer, before it is returned) orBOTH.One of
"INPUT","OUTPUT","BOTH"actionenum<string>requiredWhat a finding does:
BLOCK(the request fails with 422),REDACT(the match is replaced with a placeholder and the request continues) orMONITOR(logged only). Use an action the validator lists insupported_actions.One of
"BLOCK","REDACT","MONITOR"configmap<string, object>The validator's settings, as a JSON object matching its
config_schema(itsdefault_configis a starting point). A config the validator rejects is a 400. Default: an empty object.
Responses
idstring<uuid>The guardrail's unique id (UUID).
slugstringThe guardrail's identifier in URLs, on virtual keys and in the
x-guardrailheader:gr-and 16 hex characters. It never changes.namestringDisplay name, unique within the organization.
descriptionstringFree-text description. Null when none is set.
organizationstringSlug of the organization that owns the guardrail.
workspace_idstring<uuid>Id (UUID) of the workspace the guardrail belongs to.
enabledbooleanWhether the guardrail runs. A disabled guardrail is skipped wherever it is applied.
checksobject[]The guardrail's checks.
Child attributes
typestringrequiredThe validator's id, from
GET /v1/guardrail-validators, for examplePII_DETECTOR,REGEX_MATCH,banned_wordsorprompt_injection. An unknown id is a 400. A validator of kindLLM_JUDGEneeds a plan with AI guardrails (402 otherwise).targetenum<string>requiredWhere the check runs:
INPUT(the request's messages, before the provider is called),OUTPUT(the provider's answer, before it is returned) orBOTH.One of
"INPUT","OUTPUT","BOTH"actionenum<string>requiredWhat a finding does:
BLOCK(the request fails with 422),REDACT(the match is replaced with a placeholder and the request continues) orMONITOR(logged only). Use an action the validator lists insupported_actions.One of
"BLOCK","REDACT","MONITOR"configmap<string, object>The validator's settings, as a JSON object matching its
config_schema(itsdefault_configis a starting point). A config the validator rejects is a 400. Default: an empty object.
attached_keysobject[]The virtual keys that apply this guardrail. Filled by
GET /v1/guardrails/{slug}; empty in the other responses.Child attributes
slugstringThe virtual key's slug.
namestringThe virtual key's display name.
statusstringThe virtual key's status:
ACTIVE,DISABLED,EXHAUSTEDorEXPIRED.workspace_idstring<uuid>Id (UUID) of the virtual key's workspace. Null for a key with no workspace.
attached_key_countinteger<int32>How many virtual keys apply this guardrail. Filled by
GET /v1/guardrails/{slug}; null in the other responses.created_bystringIdentifier of the caller (user or API key) that created the guardrail.
created_atstring<date-time>When the guardrail was created (ISO 8601).
updated_atstring<date-time>When the guardrail was last changed (ISO 8601).