OpenAI API

Modifies a user's role in the project.

post
https://api.openai.com/v1/organization/projects/{project_id}/users/{user_id}

Path Parameters

project_idstringrequired

The ID of the project.

user_idstringrequired

The ID of the user.

Body

application/json

The project user update request payload.

ProjectUserUpdateRequest

rolestringrequired

owner or member

Allowed values:ownermember

Response

application/json

Project user’s role updated successfully.

ProjectUser

Represents an individual user in a project.

objectstringrequired

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

Allowed values:organization.project.user

idstringrequired

The identifier, which can be referenced in API endpoints

namestringrequired

The name of the user

emailstringrequired

The email address of the user

rolestringrequired

owner or member

Allowed values:ownermember

added_atintegerrequired

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

post/organization/projects/{project_id}/users/{user_id}

Body

{ "role": "owner" }
 
application/json

Deletes a user from the project.

delete
https://api.openai.com/v1/organization/projects/{project_id}/users/{user_id}

Path Parameters

project_idstringrequired

The ID of the project.

user_idstringrequired

The ID of the user.

Response

application/json

Project user deleted successfully.

ProjectUserDeleteResponse

objectstringrequired

Allowed values:organization.project.user.deleted

idstringrequired
deletedbooleanrequired
delete/organization/projects/{project_id}/users/{user_id}
 
application/json

Lists all of the users in the organization.

get
https://api.openai.com/v1/organization/users

Query Parameters

limitinteger

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

Default:20

afterstring

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.

emailsarray[string]

Filter by the email address of users.

Response

200 application/json

Users listed successfully.

UserListResponse

objectstringrequired

Allowed values:list

dataarray[object]required

Represents an individual user within an organization.

Show Child Parameters
first_idstringrequired
last_idstringrequired
has_morebooleanrequired
get/organization/users
 
200 application/json

Retrieves a user by their identifier.

get
https://api.openai.com/v1/organization/users/{user_id}

Path Parameters

user_idstringrequired

The ID of the user.

Response

200 application/json

User retrieved successfully.

User

Represents an individual user within an organization.

objectstringrequired

The object type, which is always organization.user

Allowed values:organization.user

idstringrequired

The identifier, which can be referenced in API endpoints

namestringrequired

The name of the user

emailstringrequired

The email address of the user

rolestringrequired

owner or reader

Allowed values:ownerreader

added_atintegerrequired

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

get/organization/users/{user_id}
 
200 application/json

Modifies a user's role in the organization.

post
https://api.openai.com/v1/organization/users/{user_id}

Path Parameters

user_idstringrequired

The ID of the user.

Body

application/json

The new user role to modify. This must be one of owner or member.

UserRoleUpdateRequest

rolestringrequired

owner or reader

Allowed values:ownerreader

Response

200 application/json

User role updated successfully.

User

Represents an individual user within an organization.

objectstringrequired

The object type, which is always organization.user

Allowed values:organization.user

idstringrequired

The identifier, which can be referenced in API endpoints

namestringrequired

The name of the user

emailstringrequired

The email address of the user

rolestringrequired

owner or reader

Allowed values:ownerreader

added_atintegerrequired

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

post/organization/users/{user_id}

Body

{ "role": "owner" }
 
200 application/json