NAME
OpenAPI::Client::OpenAI::Path::organization-projects-project_id-spend_alerts-alert_id - Documentation for the /organization/projects/{project_id}/spend_alerts/{alert_id} path.
OPERATIONS
DELETE /organization/projects/{project_id}/spend_alerts/{alert_id}
delete-project-spend-alert
$client->delete_project_spend_alert({
body => { ... },
});
Deletes a project spend alert.
Path/query parameters
project_id(in path, required, string) - The ID of the project to update.alert_id(in path, required, string) - The ID of the spend alert to delete.
Responses
200 - Project spend alert deleted successfully.
Content-Type: application/json
Example:
{
"deleted" : false,
"id" : "string",
"object" : "project.spend_alert.deleted"
}
POST /organization/projects/{project_id}/spend_alerts/{alert_id}
update-project-spend-alert
$client->update_project_spend_alert({
body => { ... },
});
Updates a project spend alert.
Path/query parameters
project_id(in path, required, string) - The ID of the project to update.alert_id(in path, required, string) - The ID of the spend alert to update.
Responses
200 - Project spend alert updated successfully.
Content-Type: application/json
Example:
{
"currency" : "USD",
"id" : "alert_abc123",
"interval" : "month",
"notification_channel" : {
"recipients" : [
"finance@example.com"
],
"subject_prefix" : "OpenAI spend alert",
"type" : "email"
},
"object" : "project.spend_alert",
"threshold_amount" : 100000
}
SCHEMAS
CreateSpendAlertBody
Properties:
currency(string, required) - The currency for the threshold amount.Allowed values: USD
interval(string, required) - The time interval for evaluating spend against the threshold.Allowed values: month
notification_channel(SpendAlertNotificationChannel, required)See "SpendAlertNotificationChannel" below for shape.
threshold_amount(integer, required) - The alert threshold amount, in cents.
ProjectSpendAlert
Properties:
currency(string, required) - The currency for the threshold amount.Allowed values: USD
id(string, required) - The identifier, which can be referenced in API endpoints.interval(string, required) - The time interval for evaluating spend against the threshold.Allowed values: month
notification_channel(SpendAlertNotificationChannel, required)See "SpendAlertNotificationChannel" below for shape.
object(string, required) - The object type, which is alwaysproject.spend_alert.Allowed values: project.spend_alert
threshold_amount(integer, required) - The alert threshold amount, in cents.
ProjectSpendAlertDeletedResource
Properties:
deleted(boolean, required) - Whether the spend alert was deleted.id(string, required) - The deleted spend alert ID.object(string, required) - Alwaysproject.spend_alert.deleted.Allowed values: project.spend_alert.deleted
SpendAlertNotificationChannel
Properties:
recipients(array of string, required) - Email addresses that receive the spend alert notification.subject_prefix(anyOf) - Optional subject prefix for alert emails.type(string, required) - The notification channel type. Currently onlyemailis supported.Allowed values: email
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.