Skip to main content
Fetch, modify, or hard-delete a single guardrail policy. Visibility: author or any member of the owning org. Non-members receive 404 so the existence of team policies is never leaked.

Authentication

Requires a Bearer token with the billing API key scope.

GET

Fetch the full policy snapshot.

PATCH

Update fields on an existing policy. Sending rules replaces the entire rule set (the rules table is treated as a single document on save).
string
Policy name.
string
Free-text description.
object[]
Replacement rule set.
boolean
Pause/unpause without deleting.
boolean
Promote/demote default. One default per scope.
Team-scoped policies require the manageWebhooks permission on the active organization.

DELETE

Hard delete. Cascade-removes every api_key_guardrail_policies binding pointing at this policy — previously-bound keys revert to the strict opt-in default (no enforcement).

Errors

  • 400 guardrail_policy_invalid — Validation failure on PATCH.
  • 404 not_found — Policy doesn’t exist or isn’t visible to the caller.
  • 409 conflict — Default-uniqueness violation.