Sample - OpenAI API
GET/organization/groups

List organization groups

Lists groups in the organization in a paginated response. Use after to continue from a previous page, limit to control the page size, and order to choose ascending or descending order.

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

3 parameters
limitintegeroptional
Maximum number of groups to return. Must range from 0 to 1000; defaults to 100 when omitted.
Default:100
afterstringoptional
Group ID cursor that defines where to continue the list from the previous page.
orderstringoptional
Sort order for the returned groups: `asc` or `desc`. Defaults to `asc` when omitted.
Allowed:ascdescDefault:asc

2 status codes
200Returns a paginated list of organization groups with the current page of groups, a `has_more` indicator, and a `next` cursor.
objectstringrequired
Always `list`.
Allowed:list
dataarray<object>required
Groups returned in the current page.
has_morebooleanrequired
Whether additional groups are available when paginating.
nextstringrequired
Cursor to fetch the next page of results, or `null` if there are no more results.
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

limit must range from 0 to 1000, and order must be asc or desc; omitted values default to 100 and asc, respectively. A 429 is returned when the request was rejected because a rate limit was exceeded.