Skip to main content
POST
Update Spending Caps

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Spending cap configuration

monthly_spending_budget
integer | null

Soft spending limit in USD cents. Triggers alerts but doesn't block API access. Set to null to remove budget limit.

Required range: x >= 0
Example:

10000

spending_alert_thresholds
integer[] | null

Percentage thresholds for spending alerts (0-100). When current spending reaches each threshold, an alert is sent.

Example:
spending_alerts_enabled
boolean | null

Whether to send spending alerts when thresholds are crossed.

hard_spending_cap
integer | null

Hard spending limit in USD cents. When reached, API access is blocked. Set to null to remove hard cap.

Required range: x >= 0
Example:

50000

hard_cap_enabled
boolean | null

Whether to enforce the hard spending cap.

Response

Successful Response

Response with spending cap configuration.

current_spending_cents
integer
required

Current spending in current billing cycle (cents)

Example:

23450

current_spending_usd
number
required

Current spending in current billing cycle (USD)

Example:

234.5

monthly_spending_budget
integer | null

Soft spending limit in USD cents (null = unlimited)

Example:

10000

monthly_spending_budget_usd
number | null

Soft spending limit in USD

Example:

100

spending_alert_thresholds
integer[]

Percentage thresholds for spending alerts

Example:
spending_alerts_enabled
boolean
default:true

Whether spending alerts are enabled

spending_alerts_sent
integer[]

Alert thresholds triggered in current billing cycle

Example:
hard_spending_cap
integer | null

Hard spending limit in USD cents (null = no hard cap)

Example:

50000

hard_spending_cap_usd
number | null

Hard spending limit in USD

Example:

500

hard_cap_enabled
boolean
default:false

Whether hard spending cap is enforced

budget_percentage_used
number | null

Percentage of budget used (null if no budget set)

Example:

46.9