API · Dashboard billing
PUT /accounts/{id}/auto-topup
Turn auto top-up on or off and set its threshold, pack and monthly cap.
| |
|---|
| Request | PUT /v1/accounts/{id}/auto-topup |
| Operation id | accounts.autoTopup.update |
| Cost | Free |
| Auth | Dashboard session: Authorization: Bearer <session_token>. API keys are refused. |
Below threshold_credits (100 to 1000000, under the pack's credits) the saved card is charged for the pack, at most monthly_cap_usd per UTC month (up to $10000). Turning it on needs a saved card (409 otherwise). A declined card turns it off and emails the owners.
| Name | Type | Required | Description |
|---|
id | string | yes | Example: acct_01J…. |
| Field | Type | Required | Description |
|---|
enabled | boolean | yes | |
threshold_credits | integer | yes | |
pack | string | yes | starter, builder, scale, volume |
monthly_cap_usd | string | yes | |
| Status | Meaning | Schema |
|---|
200 | The saved settings. | AutoTopup |
400 | Invalid settings. | Error |
401 | Not signed in, or an API key was sent. | Error |
403 | Members can look; owners and admins make changes. | Error |
404 | No such account among yours. | Error |
409 | No saved card yet. | Error |
| Field | Type | Description |
|---|
enabled | boolean | |
active | boolean | Enabled with a saved card: the next spend below the threshold charges it. |
threshold_credits | integer | |
pack | string | |
monthly_cap_usd | string | |
spent_this_month_usd | string | |
card | object | null | |
disabled_reason | string | null | |
attempts | object[] | |
Errors use one shape everywhere; see Errors for every code and what to do.