POST/organization/spend_limit

Update organization spend limit

Create or replace the organization's hard spend limit.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 body fields

Parameters for the hard spend limit you want to create or replace.

threshold_amountintegerrequired
The hard spend limit amount, in cents.
currencystringrequired
The currency for the threshold amount. Currently, only `USD` is supported.
Allowed:USD
intervalstringrequired
The time interval for evaluating spend against the threshold. Currently, only `month` is supported.
Allowed:month

3 status codes
200Hard spend limit created or replaced successfully.
objectstringrequired
The object type, which is always `organization.spend_limit`.
Allowed:organization.spend_limitDefault:organization.spend_limit
threshold_amountintegerrequired
The hard spend limit amount, in cents.
currencystringrequired
The currency for the threshold amount. Currently, only `USD` is supported.
intervalstringrequired
The time interval for evaluating spend against the threshold. Currently, only `month` is supported.
enforcementobjectrequired
The current enforcement state of the hard spend limit.
400The requested spend limit is invalid or cannot be applied.
errorobjectrequired
403The caller does not have permission to perform this operation.
errorobjectrequired
Details about the permission error.

Error handling

A 400 is returned: The requested spend limit is invalid or cannot be applied. A 403 is returned: The caller does not have permission to perform this operation.