OpenAI API

Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.

post
https://api.openai.com/v1/organization/invites

Body

application/json

The invite request payload.

InviteRequest

emailstringrequired

Send an email to this address

rolestringrequired

owner or reader

Allowed values:readerowner

projectsarray[object]

An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior.

Show Child Parameters

Response

200 application/json

User invited successfully.

Invite

Represents an individual invite to the organization.

objectstringrequired

The object type, which is always organization.invite

Allowed values:organization.invite

idstringrequired

The identifier, which can be referenced in API endpoints

emailstringrequired

The email address of the individual to whom the invite was sent

rolestringrequired

owner or reader

Allowed values:ownerreader

statusstringrequired

accepted,expired, or pending

Allowed values:acceptedexpiredpending

invited_atintegerrequired

The Unix timestamp (in seconds) of when the invite was sent.

expires_atintegerrequired

The Unix timestamp (in seconds) of when the invite expires.

accepted_atinteger

The Unix timestamp (in seconds) of when the invite was accepted.

projectsarray[object]

The projects that were granted membership upon acceptance of the invite.

Show Child Parameters
post/organization/invites

Body

{ "email": "email", "role": "reader" }
 
200 application/json

Retrieves an invite.

get
https://api.openai.com/v1/organization/invites/{invite_id}

Path Parameters

invite_idstringrequired

The ID of the invite to retrieve.

Response

200 application/json

Invite retrieved successfully.

Invite

Represents an individual invite to the organization.

objectstringrequired

The object type, which is always organization.invite

Allowed values:organization.invite

idstringrequired

The identifier, which can be referenced in API endpoints

emailstringrequired

The email address of the individual to whom the invite was sent

rolestringrequired

owner or reader

Allowed values:ownerreader

statusstringrequired

accepted,expired, or pending

Allowed values:acceptedexpiredpending

invited_atintegerrequired

The Unix timestamp (in seconds) of when the invite was sent.

expires_atintegerrequired

The Unix timestamp (in seconds) of when the invite expires.

accepted_atinteger

The Unix timestamp (in seconds) of when the invite was accepted.

projectsarray[object]

The projects that were granted membership upon acceptance of the invite.

Show Child Parameters
get/organization/invites/{invite_id}
 
200 application/json

Delete an invite. If the invite has already been accepted, it cannot be deleted.

delete
https://api.openai.com/v1/organization/invites/{invite_id}

Path Parameters

invite_idstringrequired

The ID of the invite to delete.

Response

200 application/json

Invite deleted successfully.

InviteDeleteResponse

objectstringrequired

The object type, which is always organization.invite.deleted

Allowed values:organization.invite.deleted

idstringrequired
deletedbooleanrequired
delete/organization/invites/{invite_id}
 
200 application/json

Returns a list of projects.

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

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.

include_archivedboolean

If true returns all projects including those that have been archived. Archived projects are not included by default.

Default:false

Response

200 application/json

Projects listed successfully.

ProjectListResponse

objectstringrequired

Allowed values:list

dataarray[object]required

Represents an individual project.

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

Create a new project in the organization. Projects can be created and archived, but cannot be deleted.

post
https://api.openai.com/v1/organization/projects

Body

application/json

The project create request payload.

ProjectCreateRequest

namestringrequired

The friendly name of the project, this name appears in reports.

Response

200 application/json

Project created successfully.

Project

Represents an individual project.

idstringrequired

The identifier, which can be referenced in API endpoints

objectstringrequired

The object type, which is always organization.project

Allowed values:organization.project

namestringrequired

The name of the project. This appears in reporting.

created_atintegerrequired

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

archived_atinteger | null

The Unix timestamp (in seconds) of when the project was archived or null.

statusstringrequired

active or archived

Allowed values:activearchived

post/organization/projects

Body

{ "name": "name" }
 
200 application/json