Skip to content

List groups

GET/organization/groups

Lists all groups in the organization.

Query ParametersExpand Collapse
after: optional string

A cursor for use in pagination. after is a group ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with group_abc, your subsequent call can include after=group_abc in order to fetch the next page of the list.

limit: optional number

A limit on the number of groups to be returned. Limit can range between 0 and 1000, and the default is 100.

minimum0
maximum1000
order: optional "asc" or "desc"

Specifies the sort order of the returned groups.

Accepts one of the following:
"asc"
"desc"
ReturnsExpand Collapse
data: array of object { id, created_at, is_scim_managed, name }

Groups returned in the current page.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatint64
is_scim_managed: boolean

Whether the group is managed through SCIM and controlled by your identity provider.

name: string

Display name of the group.

has_more: boolean

Whether additional groups are available when paginating.

object: "list"

Always list.

List groups

curl https://api.openai.com/v1/organization/groups \
    -H "Authorization: Bearer $OPENAI_API_KEY"
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "is_scim_managed": true,
      "name": "name"
    }
  ],
  "has_more": true,
  "next": "next",
  "object": "list"
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "is_scim_managed": true,
      "name": "name"
    }
  ],
  "has_more": true,
  "next": "next",
  "object": "list"
}