Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

List organization spend alerts

$ openai admin:organization:spend-alerts list
GET
/organization/spend_alerts

Lists organization spend alerts.

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.

--limit: optional number

A limit on the number of spend alerts to return. Defaults to 20.

--order: optional "asc" or "desc"

Sort order for the returned spend alerts.

Returns
OrganizationSpendAlertListResource: object { data, first_id, has_more, 2 more }

Paginated list of organization spend alerts.

data: array of OrganizationSpendAlert { id, currency, interval, 3 more }

Spend alerts returned in the current page.

first_id: string

The ID of the first spend alert in this page.

has_more: boolean

Whether more spend alerts are available when paginating.

last_id: string

The ID of the last spend alert in this page.

object: "list"

Always list.

List organization spend alerts

openai admin:organization:spend-alerts list \
  --admin-api-key 'My Admin API Key'
{
    "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
}