Spend Limits

Read and set the spend limit of your organization and of each workspace.

Read and set the spend limits that cap what your organization and each workspace can spend per period. See Spend limits for what counts as spend, when periods reset and what an enforced limit refuses.

GET  /v1/organizations/spend_limit
POST /v1/organizations/spend_limit
GET  /v1/organizations/workspaces/:workspace_id/spend_limit
POST /v1/organizations/workspaces/:workspace_id/spend_limit
  • The organization limit covers every workspace and is monthly only.
  • Each workspace limit covers that workspace and is daily, weekly or monthly.
  • Both are optional and checked independently. Periods are in UTC.
  • A monthly limit can have up to 5 email notifications (alerts), sent to the organization's owners, admins and billing members.
  • API keys have no spend limit of their own.

Endpoints

MethodEndpointDescription
GET/v1/organizations/spend_limitRetrieve the organization spend limit
POST/v1/organizations/spend_limitUpdate the organization spend limit
GET/v1/organizations/workspaces/:workspace_id/spend_limitRetrieve a workspace spend limit
POST/v1/organizations/workspaces/:workspace_id/spend_limitUpdate a workspace spend limit

The spend limit object

type'spend_limit'optional

Always spend_limit.

workspace_idstring | nulloptional

The workspace's ID, or null for the organization limit.

amountstring | nulloptional

The limit in US dollars, or null when no limit is set.

periodstringoptional

How often the limit starts over, in UTC: every day at 00:00, every Monday at 00:00, or on the 1st of the month at 00:00. Always monthly for the organization, and when no limit is set.

Allowed values:dailyweeklymonthly
enforcebooleanoptional

true: once current_spend reaches amount, new requests in this scope are refused with 402. false: nothing is refused. Always false when no limit is set.

include_perksbooleanoptional

Whether usage paid by perks counts toward the limit.

current_spendstringoptional

What was spent in the current period, in US dollars, counted as the limit counts it. Without a limit, this month's spend.

resets_atstringoptional

When the current period ends (RFC 3339).

alertsobject[]optional

The limit's email notifications, by percent. Always empty unless the limit is monthly. They go to the organization's owners, admins and billing members.

alerts[].idstringoptional

The alert's ID.

alerts[].percentintegeroptional

The share of amount, from 1 to 200, that this month's spend must reach for the alert to be sent.

alerts[].enabledbooleanoptional

Whether the alert is sent.

{
  "type": "spend_limit",
  "workspace_id": null,
  "amount": "100.00000000",
  "period": "monthly",
  "enforce": true,
  "include_perks": true,
  "current_spend": "42.18350000",
  "resets_at": "2026-12-01T00:00:00.000Z",
  "alerts": [
    {
      "id": "3f1c9a52-6e0b-4d8e-9b7a-2c4d5e6f7a81",
      "percent": 80,
      "enabled": true
    }
  ]
}