Skip to main content
PUT
/
admin
/
model-access
/
{id}
Update a model access policy
curl --request PUT \
  --url https://{organization_id}.platform.barndoor.ai/api/llm-gateway/admin/model-access/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "scope_type": "<string>",
  "scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "scope_value": "<string>",
  "targets": [
    {
      "kind": "model_alias",
      "alias": "gpt-4o-mini"
    }
  ],
  "enabled": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "targets": [
    {
      "kind": "model_alias",
      "alias": "gpt-4o-mini"
    }
  ],
  "enabled": true,
  "scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "scope_value": "<string>"
}

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.

Path Parameters

id
string<uuid>
required

Body

application/json

All fields optional. targets cannot be empty if provided.

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

Response

The updated 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