List organization spend alerts
admin.organization.spend_alerts.list(**kwargs) -> ConversationCursorPage<OrganizationSpendAlert { id, currency, interval, 3 more } >
GET/organization/spend_alerts
Lists organization spend alerts.
List organization spend alerts
require "openai"
openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")
page = openai.admin.organization.spend_alerts.list
puts(page){
"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
}