latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-21163196628.8 KB

2d6e4912e230

scoped-budgets

Create Scoped Budget

Create a scoped budget.

Answers 404 when the scope names nothing, rather than creating a ceiling that can never bind.

post/v1/scoped-budgets

Request body

budget_idstring required

The budget this ceiling enforces; its limit and period are read through it

namestring nullable

Admin-facing label for this ceiling

provider_key_idstring nullable

Narrow the cap to one provider instance; null caps spend across every provider

scope_idstring required

Id of the capped identity: an organization, workspace, membership row, or API key

scope_type'organization' | 'workspace' | 'workspace_member' | 'org_member' | 'api_token' required

Which kind of identity this ceiling caps

Response

Successful Response

budget_duration_secinteger nullable required
budget_idstring required
created_atstring required
current_spendnumber required
idstring required
max_budgetnumber nullable required
namestring nullable required
period_endstring nullable required
period_startstring nullable required
provider_key_idstring nullable required
reserved_spendnumber required
reset_alignmentstring nullable required
scope_idstring required
scope_typestring required
updated_atstring required