Sample - OpenAI API
GET/organization/groups/{group_id}/users

List users in a group

Lists the users assigned to a group. Use limit, after, and order to control the page size, cursor position, and sort direction of the results. The response indicates whether more users are available and provides a cursor for the next page when applicable.

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

4 parameters
group_idstringrequired
The unique identifier of the group whose members to list.
limitintegeroptional
Maximum number of users to return. Must be between 0 and 1000. Defaults to 100 when omitted.
Default:100
afterstringoptional
Cursor containing the ID of the last user from the previous response; use it to retrieve the next page.
orderstringoptional
Sort order for the users: `asc` or `desc`. Defaults to `desc` when omitted.
Allowed:ascdescDefault:desc

2 status codes
200Returns a paginated list containing user objects with their IDs, names, and email values, plus a `has_more` indicator and a `next` pagination cursor.
objectstringrequired
Always `list`.
Allowed:list
dataarray<object>required
Users in the current page.
has_morebooleanrequired
Whether more users are available when paginating.
nextstringrequired
Cursor to fetch the next page of results, or `null` when no further users are available.
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

limit must be between 0 and 1000 and defaults to 100 when omitted. order must be asc or desc and defaults to desc when omitted; use after with the last returned user ID to continue pagination. A 429 is returned when the request exceeds the applicable rate limit.