Sample - OpenAI API
GET/organization/spend_alerts

List organization spend alerts

Lists the spend alerts configured for the organization. Use limit, order, after, and before to control page size, sort order, and cursor-based navigation through the alerts.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

4 parameters
limitintegeroptional
The maximum number of spend alerts to return, from 0 to 100. Defaults to 20 when omitted.
orderstringoptional
The sort order for returned spend alerts: `asc` or `desc`. Defaults to `asc` when omitted.
Allowed:ascdescDefault:asc
afterstringoptional
The identifier of the last spend alert from the previous response, used to fetch the next page.
beforestringoptional
The identifier of the first spend alert from the previous response, used to fetch the previous page.

1 status code
200Returns a paginated list of organization spend alerts with the first and last alert identifiers and a `has_more` indicator.
objectstringrequired
Always `list`.
Allowed:list
dataarray<object>required
Spend alerts returned in the current page.
first_idstringrequired
The ID of the first spend alert in this page.
last_idstringrequired
The ID of the last spend alert in this page.
has_morebooleanrequired
Whether more spend alerts are available when paginating.

Error handling

limit must be between 0 and 100 and defaults to 20 when omitted, while order must be asc or desc. Use after or before with a spend alert identifier to navigate between result pages.