v17

latestOpenAPI 3.0.1raw.githubusercontent.com2026-07-08165682.0 MB
Traffic budgets

Update a traffic budget

Authorization

A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:

Service Token Accesses write_database

OAuth Scopes

ResourceScopes
Organizationwrite_databases
Databasewrite_database
patch/organizations/{organization}/databases/{database}/branches/{branch}/traffic/budgets/{id}

Path parameters

organizationstring required

Organization name slug from list_organizations. Example: acme.

databasestring required

Database name slug from list_databases. Example: app-db.

branchstring required

Branch name from list_branches. Example: main.

idstring required

The ID of the traffic budget

Request body

namestring

Name of the traffic budget

mode'enforce' | 'warn' | 'off'

The mode of the traffic budget

capacityinteger

The maximum capacity that can be banked, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set.

rateinteger

The rate at which capacity refills, as a percentage of server resources (0-100). Unlimited when not set.

burstinteger

The maximum capacity a single query can consume, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set.

concurrencyinteger

The percentage of available worker processes this policy can use (0-100). Unlimited when not set.

warning_thresholdinteger

A percentage of capacity, burst, or concurrency thresholds to emit warnings for enforced budgets (0-100).

rulesstring[]

Array of traffic rules to apply to the budget

Response

Returns the updated traffic budget

idstring required

The ID of the traffic budget

namestring required

The name of the budget

mode'enforce' | 'warn' | 'off' required

The mode of the budget

capacitynumber nullable

The maximum capacity that can be banked, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set.

ratenumber nullable

The rate at which capacity refills, as a percentage of server resources (0-100). Unlimited when not set.

burstnumber nullable

The maximum capacity a single query can consume, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set.

concurrencynumber nullable

The percentage of available worker processes this policy can use (0-100). Unlimited when not set.

warning_thresholdnumber nullable

A percentage of capacity, burst, or concurrency thresholds to emit warnings for enforced budgets (0-100).

created_atstring required

When the budget was created

updated_atstring required

When the budget was updated