Skip to main content
POST
Create or replace the field-control policy for an MCP server

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.

Body

application/json
mcp_server_id
string
required
name
string
required
catalog_unlisted_table_action
string | null

This server's override for tables no catalog-aware SQL rule covers: allow, block or observe; null clears it back to the org default. Omit to keep the stored value. Ignored unless the catalog SQL controls feature is enabled for the organization.

directory_slug
string | null

Seeded directory slug (slack, gdrive). Required when rules contain when.

enabled
boolean
rules
any

Response

The stored field-control policy. Returned for both a create and a replace — the handler does not distinguish them in the status code

created_at
string
required
created_by
string
required
enabled
boolean
required
id
string
required
mcp_server_id
string
required
name
string
required
org_id
string
required
rules
any
required
updated_at
string
required
updated_by
string
required
version
integer<int32>
required
catalog_unlisted_table_action
string | null

This server's override for tables no catalog-aware SQL rule covers. Absent when not set, which means the org default applies.