Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Users

Create project user
POST/organization/projects/{project_id}/users
Delete project user
DELETE/organization/projects/{project_id}/users/{user_id}
List project users
GET/organization/projects/{project_id}/users
Retrieve project user
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
POST/organization/projects/{project_id}/users/{user_id}
ModelsExpand Collapse
ProjectUser object { id, added_at, object, 3 more }

Represents an individual user in a project.

id: string

The identifier, which can be referenced in API endpoints

added_at: number

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

formatunixtime
object: "organization.project.user"

The object type, which is always organization.project.user

role: string

owner or member

email: optional string

The email address of the user

name: optional string

The name of the user

UserDeleteResponse object { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.user.deleted"

UsersRoles

Assign project role to user
POST/projects/{project_id}/users/{user_id}/roles
Unassign project role from user
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}
List project user role assignments
GET/projects/{project_id}/users/{user_id}/roles
Retrieve project user role
GET/projects/{project_id}/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
RoleCreateResponse object { object, role, user }

Role assignment linking a user to a role.

object: "user.role"

Always user.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

user: OrganizationUser { id, added_at, object, 13 more }

Represents an individual user within an organization.

RoleDeleteResponse object { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

RoleListResponse object { id, assignment_sources, created_at, 9 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

assignment_sources: array of object { principal_id, principal_type }

Principals from which the role assignment is inherited, when available.

principal_id: string
principal_type: string
created_at: number

When the role was created.

formatunixtime
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

User details for the actor that created the role, when available.

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatunixtime
RoleRetrieveResponse object { id, assignment_sources, created_at, 9 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

assignment_sources: array of object { principal_id, principal_type }

Principals from which the role assignment is inherited, when available.

principal_id: string
principal_type: string
created_at: number

When the role was created.

formatunixtime
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

User details for the actor that created the role, when available.

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatunixtime