Sample - OpenAI API
GET/organization/projects/{project_id}/groups

List project groups

Lists the groups that have access to a project. Use limit, after, and order to control pagination and sort order for the returned memberships. The response indicates whether more project groups are available and provides a cursor for the next page.

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

4 parameters
project_idstringrequired
The ID of the project whose group access you want to list.
limitintegeroptional
The maximum number of project groups to return. Must be between 0 and 100. Defaults to 20 when omitted.
Default:20
afterstringoptional
The ID of the last group from the previous response, used to fetch the next 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 project group memberships with group details, a `has_more` indicator, and a `next` cursor.
objectstringrequired
Always `list`.
Allowed:list
dataarray<object>required
Project group memberships returned in the current page.
has_morebooleanrequired
Whether additional project group memberships are available.
nextstringrequired
Cursor to fetch the next page of results, or `null` when there are no more results.
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

A 429 is returned when the request exceeds the rate limit. project_id must identify the project whose group access you want to list. limit must be between 0 and 100, and order must be asc or desc when provided.