/v1/account/credits/ledgerAccount credit ledger
The account credit usage history: the append-only ledger of grants, top-ups, debits, and adjustments, newest first with opaque cursor pagination. Free on every plan.
Query parameters
limitinteger default: 50min 1, max 100cursorstringmax 256 chars
Responses
200A page of ledger entries and the next-page cursorentriesarray of CreditLedgerEntry requiredA page of ledger movements, newest first.
idstring requiredIdentifier of this ledger entry.
kindstring requiredThe movement: `grant` (the plan allotment for a period), `topup` (credits purchased), `debit` (credits spent on a call), or `adjustment` (a manual correction).
amountinteger requiredCredits moved, SIGNED: positive on `grant` and `topup`, negative on `debit`, either sign on `adjustment`. Sum the column to reconcile; do not take absolute values.
actorKindstring requiredWho caused the movement: `member`, `key`, or `system` (grants, purchase webhooks, and admin adjustments).
actorIdstring | null requiredThe member or key that caused it. Null on a `system` movement.
operationstring | null requiredThe API operation that was charged, on a `debit`. Null on grants, top-ups, and adjustments.
refstring | null requiredThe idempotency reference behind this entry, so a redelivered webhook or a retried grant converges on one row instead of double-crediting.
createdAtstring requiredWhen the movement was recorded, as an ISO 8601 instant.
nextCursorstring | null requiredOpaque token for the next page: pass it back as `cursor`. Null on the last page. Do not parse or construct it.
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.