Skip to main content
PATCH
Update Policy

Authorizations

Authorization
string
header
required

A Barndoor API key, sent as Authorization: Bearer <key>. Keys are prefixed bdai_ and are opaque — do not attempt to decode one. Interchangeable with an OAuth 2.0 access token.

Scopes

openid

Issue an OIDC ID token identifying the caller.

profile

Read the caller's basic profile claims.

email

Read the caller's email address.

Path Parameters

policy_id
string
required

Body

application/json

Request body for partial updates to an existing policy.

name
string | null

Human-friendly policy name, unique within an organization

description
string | null

Longer description of the policy.

support_contact
string | null

Primary point of contact associated with the policy.

tags
string[] | null

Tags for categorizing the policy.

status
enum<string> | null

The current lifecycle status of the policy.

Available options:
DRAFT,
ACTIVE,
INACTIVE,
ARCHIVED
application_ids
string[] | null

AI agents this policy applies to, as application UUIDs. An empty or omitted list means the policy applies to ALL agents — it must never contain an empty string. Retrieve real ids from GET /api/registry/v1/agents.

rules
PolicyRule · object[] | null

Full set of rules that govern the policy. This REPLACES the existing rule list on update — send the complete set, not a delta. Anything no rule grants is denied. Write ONE rule per distinct roles_groups set: put every action for a principal on a single rule and let the :approve suffix carry allow-vs-confirm, rather than splitting reads and writes across two rules naming the same principal.

Response

Successful Response

Envelope for detail responses.

policy
PolicyDetail · object
required

Detailed representation of a policy including rules.