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_limitFields 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 | nulloptionalThe 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'optionalOnly monthly is accepted for the organization.
enforcebooleanoptionaltrue refuses new requests with 402 once the limit is reached;
false only reports.
include_perksbooleanoptionalWhether usage paid by perks counts toward the limit.
alertsobject[]optionalReplaces 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[].percentintegerrequiredThe 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[].enabledbooleanoptionalWhether the alert is sent. Defaults to true.
Any other field is rejected with 400.
Response
(object)SpendLimitoptionalThe 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
| Status | Reason |
|---|---|
400 | amount 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. |