Set this tenant's budget
PUT
/v1/billing/budget
const url = 'https://api.vocapable.com/v1/billing/budget';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"spend_cap_minor":1,"spend_cap_period":"example","low_balance_threshold_minor":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.vocapable.com/v1/billing/budget \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "spend_cap_minor": 1, "spend_cap_period": "example", "low_balance_threshold_minor": 1 }'Set the spend cap and the low-balance floor. This is the cap the pacer enforces.
No audit action id and no step-up: this is the tenant setting its own budget on its
own money, not staff moving someone else’s (that path is
PATCH /admin/tenants/{id}/subscription, which is critical and step-up-gated for
exactly that reason - docs/19 §6.1).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
BudgetRequest
PUT /v1/billing/budget. Absent or null clears the field it names.
object
Examplegenerated
{ "spend_cap_minor": 1, "spend_cap_period": "example", "low_balance_threshold_minor": 1}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Budget
The tenant’s budget as stored, plus what it has spent against it so far.
object
currency
required
Currency
string
balance_minor
required
Balance Minor
integer
unpriced_meters
required
Unpriced Meters
Array<string>
Examplegenerated
{ "currency": "example", "balance_minor": 1, "spend_cap_minor": 1, "spend_cap_period": "example", "low_balance_threshold_minor": 1, "period_spend_minor": 1, "unpriced_meters": [ "example" ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}