Skip to main content
POST
Validate 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.

Body

application/json

Request body for validating a policy before creation.

name
string
required

Policy name to validate

Required string length: 1 - 255
mcp_server_id
string | null

MCP server ID to check for overlaps

application_ids
string[] | null

Application IDs to check for overlaps

exclude_policy_id
string | null

Policy ID to exclude from validation (for edit mode)

Response

Successful Response

Response for policy validation.

name_is_unique
boolean
required

Whether the policy name is unique within the organization

no_overlap_if_active
boolean
required

Whether the policy would overlap with existing active policies

overlapping_policy_names
string[]

Names of overlapping active policies, if any