The credit balance and its ledger

GEThttps://api.floconnector.com/v1/billing/credits
Scope
billing.read
Rate limit
the key's read budget, 120 a minute

credits is where the account stands now: the plan's monthly allowance used and remaining, the credits left, and when the allowance resets. Calls draw on the allowance first, then on credits; after both, a call is billed at cents_per_call when a card is on file, and calls stop when none is. grants is the ledger of credits granted, newest first, 20 a page: pass next_cursor back as cursor for the next.

Query parameters

stringoptional

The next_cursor of the previous page of the ledger.

Max length 64

Responses

200Success
creditsobject

Where the account stands on calls right now.

ShowHide 9 fields
plan_namestring

The name of the account's plan.

included_per_monthinteger

The plan's monthly call allowance. It resets on the 1st (UTC) and does not roll over.

used_this_monthinteger

Billable external tool calls so far this UTC month, across every workspace on the account.

included_remaininginteger

What is left of this month's allowance. Never below 0.

free_creditsinteger

The credit balance: credits granted minus credits used, never below 0. Calls draw on it after the allowance.

total_remaininginteger

included_remaining plus free_credits: calls left before per-call billing starts.

cents_per_callnumber

What one call costs once the allowance and the credits are used, in cents.

billing_activeboolean

True when a live subscription exists, so a card is on file for per-call billing.

resets_atstring

When the allowance resets: the 1st of next month (UTC), ISO 8601 timestamp.

grantsarray of object

One page of the credit ledger, newest first.

ShowHide 5 fields of each item
idstring

The ledger entry's id.

creditsinteger

Credits this entry added. Always positive: the ledger only adds. One credit pays for one external tool call.

sourceenum

Where the credits came from. signup: granted to a new account. pack: a purchased credit pack. promo: a promotion. adjustment: entered by FloConnector support. reward: earned through the rewards program.

signuppackpromoadjustmentreward
notestringnullable

A short note recorded with the entry. Null when there is none.

created_atstring

When the credits were granted, ISO 8601 timestamp.

next_cursorstringnullable

Pass as cursor for the next page of grants. Null on the last page.

totalinteger

How many entries the ledger holds in all, across every page.

400validation: a field failed validation; field names it.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

401unauthorized: no key, or an unknown, revoked or expired key.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

403insufficient_scope: the key lacks the route's scope, named in required. Or forbidden, or plan_limit when the plan does not include the API.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

404not_found: the thing is not in this workspace.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

429rate_limited: the key's per-minute budget is spent. Retry after Retry-After seconds.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

Errors lists every error code and what to do about it.