Skip to main content
GET
/
credits
/
balance
Get current workspace credit state
curl --request GET \
  --url https://app.hockeystack.com/api/revenue-agents/v1/credits/balance \
  --header 'Authorization: Bearer <token>'
{
  "as_of": "2023-11-07T05:31:56Z",
  "resets_at": "2023-11-07T05:31:56Z",
  "included_credits": 123,
  "on_demand_credit_limit": 123,
  "on_demand_uncapped": true,
  "monthly_used_credits": 123,
  "on_demand_used_credits": 123,
  "remaining_included_credits": 123,
  "remaining_on_demand_credits": 123,
  "is_limit_exceeded": true
}

Authorizations

Authorization
string
header
required

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

Response

Current credit state.

as_of
string<date-time>
required
resets_at
string<date-time>
required
included_credits
number
required
on_demand_credit_limit
number | null
required

Cap on overage above the included bundle. null means uncapped. SDKs that cannot model nullable numbers cleanly should branch on on_demand_uncapped instead.

on_demand_uncapped
boolean
required

true when there is no cap on overage (on_demand_credit_limit is null). Always-present boolean companion for strict typed SDKs.

monthly_used_credits
number
required
on_demand_used_credits
number
required
remaining_included_credits
number
required
remaining_on_demand_credits
number | null
required

Credits remaining before the on-demand cap is hit. null when on_demand_uncapped is true.

is_limit_exceeded
boolean
required