POST
/organization/projects/{project_id}/spend_alertsCreate a project spend alert
Creates a spend alert for a project to notify recipients when spending reaches a threshold. Provide the threshold in cents, the currency and evaluation interval, and email notification settings.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
project_idstringrequired
The ID of the project for which to create the spend alert.
Project spend alert settings. Provide a threshold, currency, evaluation interval, and email notification channel.
threshold_amountintegerrequired
The alert threshold amount, in cents.
currencystringrequired
The currency for the threshold amount.
intervalstringrequired
The time interval for evaluating spend against the threshold.
notification_channelobjectrequired
Email notification settings for a spend alert.
200Returns the created project spend alert, including its ID, threshold amount, currency, interval, and notification channel.
idstringrequired
The identifier, which can be referenced in API endpoints.
objectstringrequired
The object type, which is always `project.spend_alert`.
threshold_amountintegerrequired
The alert threshold amount, in cents.
currencystringrequired
The currency for the threshold amount.
intervalstringrequired
The time interval for evaluating spend against the threshold.
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 project spend alerts.
errorobjectrequired
Details about the permission error.
404Returned when the project is not found.
errorobjectrequired
Error handling
A 400 is returned when the request is invalid or conflicts with the hard spend limit; a 403 when the authenticated user lacks permission; and a 404 when the project is not found. threshold_amount, currency, interval, and notification_channel are required; currency must be USD, interval must be month, and the notification channel must use type email with recipients. The project_id path parameter must identify the project to update.