Skip to main content
POST
Create a model access policy

Authorizations

Authorization
string
header
required

JWT obtained through Barndoor's authentication flow. Pass the token verbatim in Authorization: Bearer <token>. Use the Barndoor SDK's loginInteractive() helper to obtain a token in scripts and notebooks.

Body

application/json
name
string
required
scope_type
string
required
policy_type
enum<string>
required
Available options:
allowlist,
denylist
targets
object[]
required
Minimum array length: 1
scope_id
string<uuid> | null
scope_value
string | null
traffic_type
enum<string>
default:llm
Available options:
llm,
all

Response

The newly created policy

id
string<uuid>
required
org_id
string<uuid>
required
name
string
required
scope_type
enum<string>
required
Available options:
org,
team,
user,
project,
api_key,
mcp_server,
agent,
role,
group
policy_type
enum<string>
required
Available options:
allowlist,
denylist
targets
object[]
required
traffic_type
enum<string>
required
Available options:
llm,
all
enabled
boolean
required
scope_id
string<uuid> | null
scope_value
string | null