/v1/account/creditsAccount credit balance
The account credit pool: spendable balance, plan allotment, the current period usage (granted/spent/remaining), the never-expiring top-up bucket, and the exact next-refresh timestamp. The per-member and per-key breakdown is included only for callers who can manage members.
Responses
200The account credit balance and usagebalanceinteger requiredTotal spendable credits right now: `period.remaining` plus `topup.balance`. This is the number a 402 is checked against.
planstring requiredThe plan whose allotment funds `period`.
unlimitedboolean requiredTrue when the plan carries no credit ceiling, in which case the period counters are informational and spend is never refused for balance.
periodobject requiredThe current period’s plan allotment. This bucket EXPIRES: whatever is left when the period rolls over does not carry forward.
grantedinteger requiredCredits the plan granted for the current period.
spentinteger requiredCredits spent against that grant so far this period.
remaininginteger requiredWhat is left of this period’s grant. Never negative: spend beyond the grant draws on `topup.balance` instead.
topupobject requiredPurchased credits. This bucket never expires and is drawn on only after the period grant is exhausted.
balanceinteger requiredCredits remaining in the purchased bucket.
refreshesAtstring requiredWhen the current period ends and a fresh grant lands, as an ISO 8601 instant.
autoTopupAutoTopUpView requiredAutomatic recharge settings for this account.
enabledboolean requiredWhether automatic recharge is armed.
thresholdCreditsinteger | null requiredRecharge fires when the spendable balance falls below this number of credits. Null when not configured.
creditsinteger | null requiredHow many credits are bought each time recharge fires. Null when not configured.
lastErrorstring | null requiredThe last off-session charge failure, in plain words. A non-null value also means recharge was DISABLED by that failure rather than retried, so a declined card stops the loop instead of storming it. Reconfiguring clears this.
membersarray of MemberCreditViewPer-member and per-key spend breakdown. Present only for callers entitled to manage members; absent otherwise, which is a permission fact and not an empty account.
actorKindstring requiredWhether this row is a `member` (a person) or a `key` (an API key acting on its own).
actorIdstring requiredThe member id or key id this row is about.
labelstring requiredA human label for the actor, for display.
monthSpentinteger requiredCredits this actor has spent in the current period. Resets when the period rolls over.
capinteger | null requiredThe per-period ceiling on this actor’s spend. Null means uncapped. Once a capped actor reaches its cap its calls are refused with a 429 until the period rolls over; it does not consume anyone else’s allowance.
401No or invalid credentialcodestring requiredStable machine-readable error code. Branch on this, never on the numeric status.
bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_errormessagestring requiredHuman-readable explanation of the refusal.
statusinteger requiredThe HTTP status code, repeated in the body.
remedyobjectA self-serve path forward, when one exists (a 402 points at the credit top-up).
kindstring requiredWhat kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.
topupconnect_mailboxurlstring requiredWhere to go to clear the condition: an API path, or a web app page when only a person can.