Skip to main content
PUT
Update a rate limit

Authorizations

Authorization
string
header
required

An access token from Barndoor's identity provider, sent as Authorization: Bearer <token>. Use a service-account token from the OAuth 2.0 client-credentials grant for scripts and CI, or a signed-in user's token. The caller needs the admin role in the organization. Gateway API keys (bd-...) are not accepted here.

Path Parameters

id
string<uuid>
required

Record ID (UUID)

Body

application/json

Fields to change. Omitted fields are left unchanged.

change_note
string | null

Optional free-text note explaining why this edit was made. Omitting it clears any previous note — deliberately not the tri-state merge-patch treatment the fields above get, because the note describes the latest change and carrying an old one forward would explain the wrong edit.

enabled
boolean | null
name
string | null
requests_per_minute
integer<int32> | null

Requests allowed per rolling 60-second window. Omit to leave unchanged; send null to clear.

scope_id
string<uuid> | null

UUID of the scoped entity, for UUID-keyed scope types such as user, team, or api_key. Omit to leave unchanged; send null to clear.

scope_type
string | null
scope_value
string | null

Name of the scoped entity, for name-keyed scope types, such as a role or IdP group name. Omit to leave unchanged; send null to clear.

target_mcp_server_id
string<uuid> | null

Only apply to requests to this MCP server. Requires traffic_type mcp or all, and cannot be combined with the LLM target fields. Omit to leave unchanged; send null to clear.

target_model_alias
string | null

Only apply to requests whose model is this alias. Cannot be combined with the other target fields. Omit to leave unchanged; send null to clear.

target_provider_id
string<uuid> | null

Only apply to requests routed to this provider. Can be combined with target_upstream_model; cannot be combined with target_model_alias or target_mcp_server_id. Omit to leave unchanged; send null to clear.

target_upstream_model
string | null

Only apply to requests routed to this upstream model. Requires target_provider_id. Omit to leave unchanged; send null to clear.

tokens_per_minute
integer<int32> | null

Tokens allowed per rolling 60-second window. Omit to leave unchanged; send null to clear.

traffic_type
string | null

Response

OK

A rate limit.

enabled
boolean
required
id
string<uuid>
required
name
string
required
org_id
string<uuid>
required
scope_type
enum<string>
required

Who a policy applies to. llm_provider and model remain for compatibility only; to limit a budget or rate limit to a provider or model, use its target_* fields.

Available options:
org,
team,
user,
project,
api_key,
mcp_server,
llm_provider,
model,
agent,
role,
group
traffic_type
enum<string>
required
Available options:
all,
llm,
mcp
member_of_group
string | null

Give each member of this IdP group their own allowance from this one policy. Only valid with scope_type: user and no scope_id or scope_value. A group-scoped policy, by contrast, shares one allowance across all members.

requests_per_minute
integer<int32> | null
scope_id
string<uuid> | null
scope_value
string | null
target_mcp_server_id
string<uuid> | null

Only apply to requests to this MCP server. Requires traffic_type mcp or all, and cannot be combined with the LLM target fields.

target_model_alias
string | null

Only apply to requests whose model is this alias. Cannot be combined with the other target fields.

target_provider_id
string<uuid> | null

Only apply to requests routed to this provider. Can be combined with target_upstream_model; cannot be combined with target_model_alias or target_mcp_server_id.

target_upstream_model
string | null

Only apply to requests routed to this upstream model. Requires target_provider_id.

tokens_per_minute
integer<int32> | null
created_by_email
string | null
created_by_name
string | null
created_by_user_id
string<uuid> | null
last_change_note
string | null

Note explaining the last change.

last_modified_at
string<date-time> | null

When the last attributed change was made.

last_modified_by_email
string | null
last_modified_by_name
string | null
last_modified_by_user_id
string<uuid> | null