Update Organization Spend Limit

Set, change or remove the organization's monthly spend limit.

Set, change or remove the organization's spend limit. It covers every workspace and starts over on the 1st of each month at 00:00 UTC. The response is the updated spend limit.

POST /v1/organizations/spend_limit

Fields you leave out keep their value. Setting a limit where there is none requires amount; the other fields then default to enforce: true and include_perks: true.

Body

amountstring | number | nulloptional

The limit in US dollars, greater than 0, with at most 8 decimals, such as "100" or "2.50". null removes the limit; send no other field with it.

period'monthly'optional

Only monthly is accepted for the organization.

enforcebooleanoptional

true refuses new requests with 402 once the limit is reached; false only reports.

include_perksbooleanoptional

Whether usage paid by perks counts toward the limit.

alertsobject[]optional

Replaces the limit's whole list of email alerts; [] removes them all. Left out, the alerts stay as they are. Up to 5, each with its own percent. Only a monthly limit takes alerts. They go to the organization's owners, admins and billing members; recipients cannot be chosen.

alerts[].percentintegerrequired

The share of amount, from 1 to 200, that this month's spend must reach. Above 100 is useful for a limit that is not enforced.

alerts[].enabledbooleanoptional

Whether the alert is sent. Defaults to true.

Any other field is rejected with 400.

Response

(object)SpendLimitoptional

The updated spend limit object. After a removal, amount is null and alerts is empty: removing a limit removes its alerts.

The new limit applies to the next request; spend already counted in the current month counts toward it.

Errors

StatusReason
400amount is not a positive amount, period is not monthly, a new limit has no amount, amount: null was sent with other fields, alerts holds more than 5 alerts, two with the same percent or an invalid value, or the body has an unknown field.