Skip to main content
PUT
Turn auto-recharge on or off

Authorizations

Authorization
string
header
required

A Cognito access token, issued through the dashboard's own sign-up and sign-in pages (a backend-for-frontend; there is no Cognito Hosted UI) and sent as Authorization: Bearer <jwt>. Dashboard operations require this scheme and cannot be called with an API key, with no exception. GET /v1/usage and GET /v1/limits offered both schemes from 0.8.0; 0.8.1 withdrew that, because the control-plane API serves them alone and its authorizer has no API-key branch. An account_id supplied by the client is ignored; all reads/writes are scoped server-side to the authenticated account.

Body

application/json
enabled
boolean
required

Whether the account should top itself up.

Response

The setting as it now stands.

Whether this account tops itself up, and the figures it would use. Every figure is null when available is false, which is the free tier: its grant is one-time and it has no price to charge.

available
boolean
required

Whether this account's tier can auto-recharge at all.

enabled
boolean
required

Whether the customer has switched it on.

threshold_credits
required

The settled balance at which a top-up is triggered — a floor crossed downward, not a total spent. It is a tenth of the tier's included allowance.

Required range: 0 <= x <= 9007199254740991
top_up_credits
required

The credits a top-up adds — one more month of the tier's allowance.

Required range: 0 <= x <= 9007199254740991
top_up_amount_cents
required

What a top-up costs, in the currency's smallest unit.

Required range: x >= 0
currency
required

ISO 4217 code for top_up_amount_cents.

failure
required

The last decline, or null. A recorded failure pauses auto-recharge; switching it on again clears this.