Budgets
Cap a customer's spend, hard or soft
A budget limits a customer’s spend over a reset period. HARD stops serving the customer at the limit; SOFT sets a figure you track without blocking traffic.
Set a budget
A customer has at most one budget, and a second POST returns 409.
cURL
An exhausted HARD budget returns 402 budget_exceeded until the period resets. To resume sooner, raise spending_limit or switch to SOFT with PATCH /v1/customers/{customer_id}/budgets/{budget_id} (only the fields you send change). DELETE on the same path removes the budget.
A SOFT budget sends no notification, so compare it against usage yourself.
Reference
A customer API key can read its budget but not create, change, or delete it. For a per-key cap on top of the budget, set the key’s spending_limit.