POST/organization/spend_alerts

Create an organization spend alert

Creates a spend alert at the organization level. Set threshold_amount in cents and configure the monthly evaluation interval and email notification recipients. The response includes the created alert and its identifier.

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

4 body fields

Organization spend alert configuration. Provide threshold_amount, currency, interval, and notification_channel.

threshold_amountintegerrequired
The alert threshold amount, in cents.
currencystringrequired
The currency for the threshold amount.
Allowed:USD
intervalstringrequired
The time interval for evaluating spend against the threshold.
Allowed:month
notification_channelobjectrequired
Email notification settings for a spend alert.

3 status codes
200Returns the created organization spend alert, including its identifier, threshold, currency, interval, and notification channel.
idstringrequired
The identifier, which can be referenced in API endpoints.
objectstringrequired
The object type, which is always `organization.spend_alert`.
Allowed:organization.spend_alert
threshold_amountintegerrequired
The alert threshold amount, in cents.
currencystringrequired
The currency for the threshold amount.
Allowed:USD
intervalstringrequired
The time interval for evaluating spend against the threshold.
Allowed:month
notification_channelobjectrequired
Email notification settings for a spend alert.
400Returned when the spend alert request is invalid or conflicts with the hard spend limit.
errorobjectrequired
403Returned when the caller does not have permission to create an organization spend alert.
errorobjectrequired
Details about the permission error.

Error handling

A 400 is returned when the request is invalid or conflicts with the hard spend limit. threshold_amount must be zero or greater, currency must be USD, and interval must be month; notification_channel.type must be email and recipients must be provided. A 403 is returned when the authenticated user does not have permission to create an organization spend alert.