Create organization spend alert
$ openai admin:organization:spend-alerts create
POST/organization/spend_alerts
Creates an organization spend alert.
Create organization spend alert
openai admin:organization:spend-alerts create \
--admin-api-key 'My Admin API Key' \
--currency USD \
--interval month \
--notification-channel '{recipients: [string], type: email}' \
--threshold-amount 0{
"id": "alert_abc123",
"object": "organization.spend_alert",
"threshold_amount": 100000,
"currency": "USD",
"interval": "month",
"notification_channel": {
"type": "email",
"recipients": ["finance@example.com"],
"subject_prefix": "OpenAI spend alert"
}
}
Returns Examples
{
"id": "alert_abc123",
"object": "organization.spend_alert",
"threshold_amount": 100000,
"currency": "USD",
"interval": "month",
"notification_channel": {
"type": "email",
"recipients": ["finance@example.com"],
"subject_prefix": "OpenAI spend alert"
}
}