Skip to main content
PUT
Update a rate limit

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

Send null for requests_per_minute or tokens_per_minute to clear that metric (the other must remain set). At least one metric must always be enforced.

name
string
scope_type
enum<string>

Who the rate limit applies to

Available options:
org,
team,
user,
role,
group,
api_key,
mcp_server,
agent,
project,
llm_provider,
model,
model_alias
scope_id
string<uuid> | null
scope_value
string | null
requests_per_minute
integer | null
tokens_per_minute
integer | null
traffic_type
enum<string>
default:all

Whether the policy applies to LLM, MCP, or both kinds of traffic

Available options:
all,
llm,
mcp
enabled
boolean

Response

The updated policy

id
string<uuid>
required
org_id
string<uuid>
required
name
string
required
Example:

"Engineering RPM cap"

scope_type
enum<string>
required

Who the rate limit applies to

Available options:
org,
team,
user,
role,
group,
api_key,
mcp_server,
agent,
project,
llm_provider,
model,
model_alias
traffic_type
enum<string>
default:all
required

Whether the policy applies to LLM, MCP, or both kinds of traffic

Available options:
all,
llm,
mcp
enabled
boolean
required
scope_id
string<uuid> | null

UUID for scopes that reference an entity (user, agent, api_key, etc.)

scope_value
string | null

String for name-based scopes (group name, role name, model alias, etc.)

requests_per_minute
integer | null
tokens_per_minute
integer | null