Skip to content
Primary navigation

List users

admin.organization.users.list(**kwargs) -> ConversationCursorPage<OrganizationUser { id, added_at, object, 13 more } >
GET/organization/users

Lists all of the users in the organization.

ParametersExpand Collapse
after: String

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

emails: Array[String]

Filter by the email address of users.

limit: Integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

ReturnsExpand Collapse
class OrganizationUser { id, added_at, object, 13 more }

Represents an individual user within an organization.

id: String

The identifier, which can be referenced in API endpoints

added_at: Integer

The Unix timestamp (in seconds) of when the user was added.

formatunixtime
object: :"organization.user"

The object type, which is always organization.user

api_key_last_used_at: Integer

The Unix timestamp (in seconds) of the user’s last API key usage.

formatunixtime
created: Integer

The Unix timestamp (in seconds) of when the user was created.

formatunixtime
developer_persona: String

The developer persona metadata for the user.

email: String

The email address of the user

is_default: bool

Whether this is the organization’s default user.

is_scale_tier_authorized_purchaser: bool

Whether the user is an authorized purchaser for Scale Tier.

is_scim_managed: bool

Whether the user is managed through SCIM.

is_service_account: bool

Whether the user is a service account.

name: String

The name of the user

projects: Projects{ data, object}

Projects associated with the user, if included.

data: Array[Data{ id, name, role}]
id: String
name: String
role: String
object: :list
role: String

owner or reader

technical_level: String

The technical level metadata for the user.

user: User{ id, object, banned, 5 more}

Nested user details.

id: String
object: :user
banned: bool
banned_at: Integer
formatunixtime
email: String
enabled: bool
name: String
picture: String

List users

require "openai"

openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

page = openai.admin.organization.users.list

puts(page)
{
    "object": "list",
    "data": [
        {
            "object": "organization.user",
            "id": "user_abc",
            "name": "First Last",
            "email": "user@example.com",
            "role": "owner",
            "added_at": 1711471533
        }
    ],
    "first_id": "user-abc",
    "last_id": "user-xyz",
    "has_more": false
}
Returns Examples
{
    "object": "list",
    "data": [
        {
            "object": "organization.user",
            "id": "user_abc",
            "name": "First Last",
            "email": "user@example.com",
            "role": "owner",
            "added_at": 1711471533
        }
    ],
    "first_id": "user-abc",
    "last_id": "user-xyz",
    "has_more": false
}