Skip to content
API referenceUpdate a guardrail

Update a guardrail

PUT/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

  • slugstringrequired

    the guardrail's slug

Query parameters

  • organizationstringrequired

    slug of the organization that owns it

Request body application/json

the fields to change

  • namestring

    New display name.

  • descriptionstring

    New description.

  • enabledboolean

    true to run the guardrail, false to skip it.

  • checksobject[]

    The full new list of checks, replacing all current ones. Validated as on create.

    Child attributes
    • typestringrequired

      The validator's id, from GET /v1/guardrail-validators, for example PII_DETECTOR, REGEX_MATCH, banned_words or prompt_injection. An unknown id is a 400. A validator of kind LLM_JUDGE needs a plan with AI guardrails (402 otherwise).

    • targetenum<string>required

      Where the check runs: INPUT (the request's messages, before the provider is called), OUTPUT (the provider's answer, before it is returned) or BOTH.

      One of "INPUT", "OUTPUT", "BOTH"

    • actionenum<string>required

      What a finding does: BLOCK (the request fails with 422), REDACT (the match is replaced with a placeholder and the request continues) or MONITOR (logged only). Use an action the validator lists in supported_actions.

      One of "BLOCK", "REDACT", "MONITOR"

    • configmap<string, object>

      The validator's settings, as a JSON object matching its config_schema (its default_config is a starting point). A config the validator rejects is a 400. Default: an empty object.

Responses

200application/json
  • idstring<uuid>

    The guardrail's unique id (UUID).

  • slugstring

    The guardrail's identifier in URLs, on virtual keys and in the x-guardrail header: gr- and 16 hex characters. It never changes.

  • namestring

    Display name, unique within the organization.

  • descriptionstring

    Free-text description. Null when none is set.

  • organizationstring

    Slug of the organization that owns the guardrail.

  • workspace_idstring<uuid>

    Id (UUID) of the workspace the guardrail belongs to.

  • enabledboolean

    Whether the guardrail runs. A disabled guardrail is skipped wherever it is applied.

  • checksobject[]

    The guardrail's checks.

    Child attributes
    • typestringrequired

      The validator's id, from GET /v1/guardrail-validators, for example PII_DETECTOR, REGEX_MATCH, banned_words or prompt_injection. An unknown id is a 400. A validator of kind LLM_JUDGE needs a plan with AI guardrails (402 otherwise).

    • targetenum<string>required

      Where the check runs: INPUT (the request's messages, before the provider is called), OUTPUT (the provider's answer, before it is returned) or BOTH.

      One of "INPUT", "OUTPUT", "BOTH"

    • actionenum<string>required

      What a finding does: BLOCK (the request fails with 422), REDACT (the match is replaced with a placeholder and the request continues) or MONITOR (logged only). Use an action the validator lists in supported_actions.

      One of "BLOCK", "REDACT", "MONITOR"

    • configmap<string, object>

      The validator's settings, as a JSON object matching its config_schema (its default_config is 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
    • slugstring

      The virtual key's slug.

    • namestring

      The virtual key's display name.

    • statusstring

      The virtual key's status: ACTIVE, DISABLED, EXHAUSTED or EXPIRED.

    • 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_bystring

    Identifier 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).

NVIDIA Inception Program member

VectorAxis is built by GK Labs, a member of NVIDIA Inception.