POST/organization/spend_alerts/{alert_id}

Update an organization spend alert

Updates a spend alert configured at the organization level. Provide the threshold, currency, evaluation interval, and email notification settings for the alert. The response contains the updated alert configuration.

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

1 parameter · 4 body fields
alert_idstringrequired
The unique identifier of the spend alert to update.

Updated 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.

4 status codes
200Returns the updated 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 update is invalid or conflicts with the hard spend limit.
errorobjectrequired
403Returned when the caller does not have permission to update the organization spend alert.
errorobjectrequired
Details about the permission error.
404Returned when the spend alert is not found.
errorobjectrequired

Error handling

A 400 is returned when the update 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. The alert_id path parameter identifies the alert to update. A 403 is returned when the authenticated user lacks permission, and a 404 is returned when the alert is not found.