Skip to main content
Set one cap on what a workspace can spend on BoxRouter-billed sandboxes. Sandboxes that use your own provider keys do not count. The cap counts settled charges and open reservations. BoxRouter refuses to create or extend a sandbox if the new reservation would exceed it. A sandbox that is already running keeps running. Before You Begin: A client and a BoxRouter API key with credentials:manage set as in Set Up Your Account.

Set the Cap

Set the cap through a client, the CLI, or the API. The dashboard does not edit it yet. Execution-only keys get 403. workspace is the only scope; any other scope fails with 400.
Both fields are required, and a new cap replaces the old one. mode is the billing mode, as in Check Your Balance. limit_period sets when the cap resets:

Read the Cap

GET /spend-limits returns the cap, or null when none is set, and how much of it the current period has used.

Clear a Cap

Clearing succeeds if the workspace has no cap.

When the Cap Is Reached

Creating or extending the sandbox fails with 402 spend_limit_exceeded. Its details name the scope (workspace), the period, and the limit, spent, and requested amounts in nanodollars. To continue, set the cap again with a higher limit_usd, or clear it. At a daily or monthly boundary, settled spending from the previous period stops counting; open reservations still count.

Next Steps

Buy and Manage Credits

Buy credits and top up automatically.

Check Your Limits

Quotas that are not about money.

How Sandbox Cost Works

Read what a sandbox cost.