Skip to content

Set this tenant's budget

PUT
/v1/billing/budget
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).

Media typeapplication/json
BudgetRequest

PUT /v1/billing/budget. Absent or null clears the field it names.

object
spend_cap_minor
Any of:
integer
>= 1
spend_cap_period
Any of:
string
/^(day|month)$/
low_balance_threshold_minor
Any of:
integer
Examplegenerated
{
"spend_cap_minor": 1,
"spend_cap_period": "example",
"low_balance_threshold_minor": 1
}

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
spend_cap_minor
required
Any of:
integer
spend_cap_period
required
Any of:
string
low_balance_threshold_minor
required
Any of:
integer
period_spend_minor
required
Any of:
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>
ValidationError
object
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": {}
}
]
}