Get Spending Caps
Get current spending cap configuration.
Returns spending cap settings including budget limits, alert thresholds, and current spending status.
Requirements:
- Read permission
Example:
response = await client.get("/v1/organizations/billing/spending-caps")
print(f"Monthly budget: ${response['monthly_spending_budget_usd']}")
print(f"Hard cap enabled: {response['hard_cap_enabled']}")
print(f"Current spending: ${response['current_spending_usd']}")
Authorizations
Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing header returns 403; an invalid or revoked key returns 401.
Response
Successful Response
Response with spending cap configuration.
Current spending in current billing cycle (cents)
23450
Current spending in current billing cycle (USD)
234.5
Soft spending limit in USD cents (null = unlimited)
10000
Soft spending limit in USD
100
Percentage thresholds for spending alerts
Whether spending alerts are enabled
Alert thresholds triggered in current billing cycle
Hard spending limit in USD cents (null = no hard cap)
50000
Hard spending limit in USD
500
Whether hard spending cap is enforced
Percentage of budget used (null if no budget set)
46.9

