Docs
Open dashboard

Get billing summary

GET/billing

Returns this workspace's spendable balance, whether a billable call would be accepted right now and why not, its subscription plan, and its usage for the current period. Never paywalled — a workspace that has run out of credits must still be able to read why.

Requires Authorization: Bearer <api_key>. Create a key in the Inspra dashboard under Workspace Settings → API Keys.

Response 200 OK

Billing summary for the workspace the API key belongs to.

  • creditsobjectrequired
    Spendable balance for this workspace. When funding_source is partner the balance is the partner wallet the workspace draws on.
    7 fields
    • balance_centsintegerrequired
      Current balance in cents. Can be negative on postpaid plans.
    • effective_rate_centsintegerrequired
      Cents charged for the next billable unit. Zero when the next unit costs nothing — included minutes remaining, an unlimited bolt-on, or a postpaid plan.
    • usage_unitstringrequired
      What effective_rate_cents and estimated_remaining count.
      minutecall
    • estimated_remainingintegernullableoptional
      Units the balance buys at effective_rate_cents. Null when the rate is zero — not zero, which would read as an empty balance.
    • funding_sourcestringrequired
      workspacepartner
    • is_low_balancebooleanrequired
      Balance is at or below the workspace's configured low-balance threshold.
    • is_billing_exemptbooleanrequired
      Workspace is funded by its partner rather than its own credits.
  • callingobjectrequired
    Whether a billable call would be accepted right now. This is the same check every billable mutation runs, so allowed: false here and a 403 from a call always agree.
    2 fields
    • allowedbooleanrequired
    • reasonstringnullablerequired
      Why calling is blocked. Null when allowed is true.
  • planobjectrequired
    2 variants
    Option 1
    • namestringrequired
    • billing_typestringrequired
      prepaidpostpaid
    • charge_modelstringrequired
      per_minuteper_call
    • statusstringrequired
      Subscription status. A non-active status is reported as-is rather than hidden.
    Option 2
  • usageobjectrequired
    Usage against the plan. The minute fields and period_end are null for a workspace with no subscription; conversations_this_month is always reported.
    5 fields
    • included_minutesintegernullablerequired
    • minutes_usedintegernullablerequired
      Minutes used in the current billing period.
    • conversations_this_monthintegerrequired
    • max_conversations_per_monthintegernullablerequired
      Plan cap on conversations per month. Null when uncapped.
    • period_endstringnullabledate-timerequired

Errors

  • 401Unauthorized
    Missing, malformed, or invalid API key.
  • 403Forbidden
    Workspace unavailable, suspended, or paywalled.
  • 429Too Many Requests
    Workspace request limit exceeded; shared across all its API keys.