---
title: "Set, change, or turn off the automatic top-up rule [admin or billing role]"
method: PUT
path: "/preview/billing/auto-topup"
tags: ["billing"]
---

# Set, change, or turn off the automatic top-up rule \[admin or billing role\]

`PUT /preview/billing/auto-topup`

## Request

- Base URL: `https://autoresearch.sfcompute.com`
- URL: `https://autoresearch.sfcompute.com/preview/billing/auto-topup`
- Auth: HTTP bearer

Set, change, or turn off the automatic top-up rule (admin or billing role): when the available balance falls below `threshold_usd`, the card on file is charged `amount_usd` (defaults: below $20, add $100). It is what keeps a prepaid organization running unattended - at zero compute stops and every disk is kept, and the rule buys the credit before that. Bounds: threshold $1 to $10,000, amount $10 to $10,000, whole cents; the rule runs at most 25 times per rolling 24 hours, within `daily_limit_usd` when you set one (0 clears it) and the platform's daily ceiling. A card must be on file: with none, buy_credits(amount_usd) answers with a payment link, and that one payment adds credit and saves the card. `disable: true` turns the rule off. Audited as a standing authorization to charge the card.

## Query parameters

- `workspace` string

## Request body

- object
  - `amount_usd` number, double, nullable: Dollars to add each time: $10 to $10,000, whole cents. Default 100.
  - `daily_limit_usd` number, double, nullable: Your ceiling on automatic charges per rolling 24 hours, in dollars (at least the amount). Omit to keep the current ceiling, 0 to clear it. The platform bound (25 attempts and its own daily ceiling) applies regardless.
  - `disable` boolean: Turn the rule off (every other field is ignored).
  - `org` string, nullable: Organization (uuid or name); omitted = your active org.
  - `threshold_usd` number, double, nullable: Buy credit when the available balance falls below this many dollars: $1 to $10,000, whole cents. Default 20.

## Response `200`

The capability's JSON result.

- Result: The capability's result: the same object the MCP tool returns as structuredContent. Resources carry an `object` type discriminator and an immutable id; money is integer micro-dollars in `*_usd_micros` fields.
  - `object` string: The resource type, when the result is one resource.

## Other responses

- `400`: Malformed request: bad JSON, a parameter that does not parse, or a value outside its range. Code `invalid`.
- `401`: No bearer token, or one this API cannot verify. Code `unauthenticated`.
- `403`: Authenticated, but the token's scopes or the account's role do not reach this operation. The message names the scope word to request. Code `forbidden`.
- `404`: No such route. Code `not_found`; the body names the OpenAPI document.
- `422`: A well-formed request the platform declined: no such node, a cap reached, a state that forbids the move. The message says which, and what to do instead. Code `refused`.
- `429`: Over this door's per-customer budget. Wait `Retry-After` seconds. Code `rate_limited`.
- `500`: Our fault. Retry; if it persists, quote the request-id. Code `internal`.

---

[API](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api.md) · [All operations](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/revisions/f88dcb70ac6c?raw)
