Usage and credit caps
Your plan's clients, messages, credits and runs are shared by every workspace in the account. This page covers how usage is counted, the warnings you get on the way to a limit, and how to stop one workspace spending everyone's credits.
What is counted
| Usage | Counts | Resets |
|---|---|---|
| Clients | Approved clients. Pending, revoked and rejected ones don't count. | Never; it's how many you have now. |
| Messages | Both ways: what clients send, and commands delivered to them. Pings and acknowledgements don't count. | On the 1st, UTC. |
| Credits | What workflow runs spend: 1 to start, then each step's price. See how credits are counted. | On the 1st, UTC. |
| Runs at once | Runs going right now, in all workspaces. | Never; it's how many are going now. |
Credits include what runs still going have spent but not yet posted, so a burst of runs can't overshoot the month by starting all at once.
For nowThe console doesn't show usage or set a workspace's cap yet. Both are in the API, below.
Warnings on the way
- Credits. At 80% and at 100% of the month's credits, the account's billing admins get an email, and the audit log records it. Past 100%, new runs draw on credit packs, and are refused when there's nothing left. Business carries on and is invoiced.
- Messages. At 80%, a warning. At the limit on Free, each client is slowed to one message a minute until the 1st. Paid plans are slowed only further on: at twice the allowance on Maker and Pro, one and a half times on Team, and never on Business.
- Clients. A board that would go past the limit is refused when it registers or is approved, with
PLAN_CLIENT_LIMIT_REACHED, and the policy's activity says so.
What each limit stops, and what keeps working, is in what happens at a limit.
A workspace's credit cap
Credits are shared, so a busy test workspace can spend the month that production needs. Give it a monthly credit cap: once the workspace has spent that many credits this month, its new runs are refused and its running ones stop at the next charge.
- A cap is a ceiling, not a reservation. Caps in an account can add up to more than it has.
- The billing admins get an email at 80% and at 100% of its cap.
- Raising or removing the cap lets new runs start again at once.
- A cap of 0 stops the workspace's workflows entirely.
What happens when…
- One workspace reaches its cap while another has plenty
- Only the capped workspace's runs are refused. The others carry on from the account's credits.
- I set a cap below what the workspace has already spent
- It's accepted, and the answer says the cap is reached: new runs are refused from then on, until the 1st or until you raise it.
- A run is going when its workspace reaches the cap
- Its next step that costs credits fails with
WORKSPACE_CREDIT_CAP_REACHEDand the run ends Out of credits. Steps already done stay done. - The month's credits run out at 23:50 on the 31st
- New runs are refused for ten minutes, then the month resets at 00:00 UTC and they start again.
- A Free account uses its messages
- Each client can still send one message a minute, state reports included, until the 1st. Commands still reach the clients.
In depth
Rules and API
Endpoints
| Call | Permission | Does |
|---|---|---|
GET /api/v1/workspaces/{workspaceRef}/usage | billing.read | This calendar month (UTC): { plan, periodStart, periodEnd, account, workspace, days }. account is pooled: credits { used, limit, topUp, topUpExpiresAt, topUpExpiring, remaining }, messages { used, limit, throttled }, clients and activeRuns{ used, limit }. workspace is this workspace's share, with its monthlyCreditCap. days is its credits per UTC day over from/to (the last 31 days by default, at most 366). |
PUT /api/v1/workspaces/{workspaceRef}/credit-cap | billing.manage | Sets { monthlyCreditCap }, or null to remove it. Answers { monthlyCreditCap, creditsSpentThisMonth, capReached }. |
Errors
| Code | Status | When |
|---|---|---|
WORKSPACE_CREDIT_CAP_INVALID | 400 | A cap below 0 or above 1012. |
WORKSPACE_CREDIT_CAP_BUSY | 503 | The workspace's runs held the cap for more than 5 seconds. Try again after Retry-After. |
WORKSPACE_CREDIT_CAP_REACHED | 409 | A test run or run by hand refused for the cap. A trigger's event shows as Refused. |
PLAN_CREDIT_LIMIT_REACHED | 409 | The same for the account's month. |
PLAN_RUN_LIMIT_REACHED | 409 | The account already has as many runs going as its plan allows. |
Rules worth knowing
remainingis what new runs may still spend, less what runs going still hold of their budgets. On Business it counts up to twice the allowance, since Business runs carry on past it.- The account is checked before the workspace cap, and the cap before the run's own budget, so the code names the first limit that ran out.
- Setting a cap also holds runs already going to it: each one's next charge is allowed only from what the cap has left.
- The 80% and 100% warnings come once per threshold and month. Workspace warnings carry the cap and what was spent; account warnings leave out the account's figures, which only
billing.readmay see. - The message warning arrives within about a minute of the crossing, in the workspace that carried the most messages.