List organization spend alerts
GET/organization/spend_alerts
Lists organization spend alerts.
Query Parameters
after: optional string
Cursor for pagination. Provide the ID of the last spend alert from the previous response to fetch the next page.
before: optional string
Cursor for pagination. Provide the ID of the first spend alert from the previous response to fetch the previous page.
List organization spend alerts
curl https://api.openai.com/v1/organization/spend_alerts?limit=20&order=asc \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
{
"object": "list",
"data": [
{
"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"
}
}
],
"first_id": "alert_abc123",
"last_id": "alert_abc123",
"has_more": false
}
Returns Examples
{
"object": "list",
"data": [
{
"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"
}
}
],
"first_id": "alert_abc123",
"last_id": "alert_abc123",
"has_more": false
}