Sample - OpenAI API
POST/organization/spend_alerts/{alert_id}

Update an organization spend alert

Updates an organization-level spend alert. Supply the complete set of alert settings in threshold_amount, currency, interval, and notification_channel; the request replaces the configured values for those fields.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

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

The organization spend alert settings to update.

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.

1 status code
200Returns the updated organization spend alert, including its identifier, object type, threshold amount, currency, interval, and notification channel settings.
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.

Error handling

threshold_amount, currency, interval, and notification_channel are required. threshold_amount must be zero or greater, currency must be USD, interval must be month, and notification_channel.type must be email with at least the required notification channel fields.