Skip to main content
Manage the 1:1 binding between an API key and a guardrail policy. The strict opt-in contract is enforced here: passing policy_id: null clears the binding and the key returns to no enforcement — there is no automatic fallback to an org or user default.

Authentication

Requires a Bearer token with the billing API key scope and access to the key (the caller must own it, or — for team keys — have access through the org).

GET

Read the current binding.

PUT

Set or clear the binding.
string
Policy UUID. Pass null to clear the binding entirely.

Scope rules

  • Personal policies can only be bound to keys owned by their author.
  • Team policies can only be bound to keys in the same org.
  • Crossing the boundary returns 400 guardrail_policy_not_bindable with a vendor-neutral message.

Errors

  • 400 guardrail_policy_not_bindable — Policy is not visible to the key’s scope.
  • 404 not_found — Key or policy doesn’t exist (or isn’t visible to the caller).