Skip to content
Primary navigation

Projects

List projects
client.admin.organization.projects.list(ProjectListParams { after, include_archived, limit } query?, RequestOptionsoptions?): ConversationCursorPage<Project { id, created_at, object, 4 more } >
GET/organization/projects
Create project
client.admin.organization.projects.create(ProjectCreateParams { name, external_key_id, geography } body, RequestOptionsoptions?): Project { id, created_at, object, 4 more }
POST/organization/projects
Retrieve project
client.admin.organization.projects.retrieve(stringprojectID, RequestOptionsoptions?): Project { id, created_at, object, 4 more }
GET/organization/projects/{project_id}
Modify project
client.admin.organization.projects.update(stringprojectID, ProjectUpdateParams { external_key_id, geography, name } body, RequestOptionsoptions?): Project { id, created_at, object, 4 more }
POST/organization/projects/{project_id}
Archive project
client.admin.organization.projects.archive(stringprojectID, RequestOptionsoptions?): Project { id, created_at, object, 4 more }
POST/organization/projects/{project_id}/archive
ModelsExpand Collapse
Project { id, created_at, object, 4 more }

Represents an individual project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
object: "organization.project"

The object type, which is always organization.project

archived_at?: number | null

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

formatunixtime
external_key_id?: string | null

The external key associated with the project.

name?: string | null

The name of the project. This appears in reporting.

status?: string | null

active or archived

ProjectsUsers

List project users
client.admin.organization.projects.users.list(stringprojectID, UserListParams { after, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectUser { id, added_at, object, 3 more } >
GET/organization/projects/{project_id}/users
Create project user
client.admin.organization.projects.users.create(stringprojectID, UserCreateParams { role, email, user_id } body, RequestOptionsoptions?): ProjectUser { id, added_at, object, 3 more }
POST/organization/projects/{project_id}/users
Retrieve project user
client.admin.organization.projects.users.retrieve(stringuserID, UserRetrieveParams { project_id } params, RequestOptionsoptions?): ProjectUser { id, added_at, object, 3 more }
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
client.admin.organization.projects.users.update(stringuserID, UserUpdateParams { project_id, role } params, RequestOptionsoptions?): ProjectUser { id, added_at, object, 3 more }
POST/organization/projects/{project_id}/users/{user_id}
Delete project user
client.admin.organization.projects.users.delete(stringuserID, UserDeleteParams { project_id } params, RequestOptionsoptions?): UserDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/users/{user_id}
ModelsExpand Collapse
ProjectUser { 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?: string | null

The email address of the user

name?: string | null

The name of the user

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

ProjectsUsersRoles

List project user role assignments
client.admin.organization.projects.users.roles.list(stringuserID, RoleListParams { project_id, after, limit, order } params, RequestOptionsoptions?): NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/projects/{project_id}/users/{user_id}/roles
Assign project role to user
client.admin.organization.projects.users.roles.create(stringuserID, RoleCreateParams { project_id, role_id } params, RequestOptionsoptions?): RoleCreateResponse { object, role, user }
POST/projects/{project_id}/users/{user_id}/roles
Unassign project role from user
client.admin.organization.projects.users.roles.delete(stringroleID, RoleDeleteParams { project_id, user_id } params, RequestOptionsoptions?): RoleDeleteResponse { deleted, object }
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse { id, created_at, created_by, 8 more }

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

id: string

Identifier for the role.

created_at: number | null

When the role was created.

formatunixtime
created_by: string | null

Identifier of the actor who created the role.

created_by_user_obj: Record<string, unknown> | null

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

description: string | null

Description of the role.

metadata: Record<string, unknown> | null

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: Array<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 | null

When the role was last updated.

formatint64
RoleCreateResponse { 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 { 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.

ProjectsService Accounts

List project service accounts
client.admin.organization.projects.serviceAccounts.list(stringprojectID, ServiceAccountListParams { after, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectServiceAccount { id, created_at, name, 2 more } >
GET/organization/projects/{project_id}/service_accounts
Create project service account
client.admin.organization.projects.serviceAccounts.create(stringprojectID, ServiceAccountCreateParams { name } body, RequestOptionsoptions?): ServiceAccountCreateResponse { id, api_key, created_at, 3 more }
POST/organization/projects/{project_id}/service_accounts
Retrieve project service account
client.admin.organization.projects.serviceAccounts.retrieve(stringserviceAccountID, ServiceAccountRetrieveParams { project_id } params, RequestOptionsoptions?): ProjectServiceAccount { id, created_at, name, 2 more }
GET/organization/projects/{project_id}/service_accounts/{service_account_id}
Delete project service account
client.admin.organization.projects.serviceAccounts.delete(stringserviceAccountID, ServiceAccountDeleteParams { project_id } params, RequestOptionsoptions?): ServiceAccountDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/service_accounts/{service_account_id}
ModelsExpand Collapse
ProjectServiceAccount { id, created_at, name, 2 more }

Represents an individual service account in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the service account was created

formatunixtime
name: string

The name of the service account

object: "organization.project.service_account"

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

role: "owner" | "member"

owner or member

One of the following:
"owner"
"member"
ServiceAccountCreateResponse { id, api_key, created_at, 3 more }
id: string
api_key: APIKey | null
id: string
created_at: number
formatunixtime
name: string
object: "organization.project.service_account.api_key"

The object type, which is always organization.project.service_account.api_key

value: string
created_at: number
formatunixtime
name: string
object: "organization.project.service_account"
role: "member"

Service accounts can only have one role of type member

ServiceAccountDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.service_account.deleted"

ProjectsAPI Keys

List project API keys
client.admin.organization.projects.apiKeys.list(stringprojectID, APIKeyListParams { after, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectAPIKey { id, created_at, last_used_at, 4 more } >
GET/organization/projects/{project_id}/api_keys
Retrieve project API key
client.admin.organization.projects.apiKeys.retrieve(stringapiKeyID, APIKeyRetrieveParams { project_id } params, RequestOptionsoptions?): ProjectAPIKey { id, created_at, last_used_at, 4 more }
GET/organization/projects/{project_id}/api_keys/{api_key_id}
Delete project API key
client.admin.organization.projects.apiKeys.delete(stringapiKeyID, APIKeyDeleteParams { project_id } params, RequestOptionsoptions?): APIKeyDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/api_keys/{api_key_id}
ModelsExpand Collapse
ProjectAPIKey { id, created_at, last_used_at, 4 more }

Represents an individual API key in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the API key was created

formatunixtime
last_used_at: number | null

The Unix timestamp (in seconds) of when the API key was last used.

formatunixtime
name: string

The name of the API key

object: "organization.project.api_key"

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

owner: Owner { service_account, type, user }
service_account?: ServiceAccount { id, created_at, name, role }

The service account that owns a project API key.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
name: string

The name of the service account.

role: string

The service account’s project role.

type?: "user" | "service_account"

user or service_account

One of the following:
"user"
"service_account"
user?: User { id, created_at, email, 2 more }

The user that owns a project API key.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
email: string

The email address of the user.

name: string

The name of the user.

role: string

The user’s project role.

redacted_value: string

The redacted value of the API key

APIKeyDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.api_key.deleted"

ProjectsRate Limits

List project rate limits
client.admin.organization.projects.rateLimits.listRateLimits(stringprojectID, RateLimitListRateLimitsParams { after, before, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectRateLimit { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more } >
GET/organization/projects/{project_id}/rate_limits
Modify project rate limit
client.admin.organization.projects.rateLimits.updateRateLimit(stringrateLimitID, RateLimitUpdateRateLimitParams { project_id, batch_1_day_max_input_tokens, max_audio_megabytes_per_1_minute, 4 more } params, RequestOptionsoptions?): ProjectRateLimit { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }
POST/organization/projects/{project_id}/rate_limits/{rate_limit_id}
ModelsExpand Collapse
ProjectRateLimit { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }

Represents a project rate limit config.

id: string

The identifier, which can be referenced in API endpoints.

max_requests_per_1_minute: number

The maximum requests per minute.

max_tokens_per_1_minute: number

The maximum tokens per minute.

model: string

The model this rate limit applies to.

object: "project.rate_limit"

The object type, which is always project.rate_limit

batch_1_day_max_input_tokens?: number

The maximum batch input tokens per day. Only present for relevant models.

max_audio_megabytes_per_1_minute?: number

The maximum audio megabytes per minute. Only present for relevant models.

max_images_per_1_minute?: number

The maximum images per minute. Only present for relevant models.

max_requests_per_1_day?: number

The maximum requests per day. Only present for relevant models.

ProjectsGroups

List project groups
client.admin.organization.projects.groups.list(stringprojectID, GroupListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<ProjectGroup { created_at, group_id, group_name, 3 more } >
GET/organization/projects/{project_id}/groups
Add project group
client.admin.organization.projects.groups.create(stringprojectID, GroupCreateParams { group_id, role } body, RequestOptionsoptions?): ProjectGroup { created_at, group_id, group_name, 3 more }
POST/organization/projects/{project_id}/groups
Remove project group
client.admin.organization.projects.groups.delete(stringgroupID, GroupDeleteParams { project_id } params, RequestOptionsoptions?): GroupDeleteResponse { deleted, object }
DELETE/organization/projects/{project_id}/groups/{group_id}
ModelsExpand Collapse
ProjectGroup { created_at, group_id, group_name, 3 more }

Details about a group’s membership in a project.

created_at: number

Unix timestamp (in seconds) when the group was granted project access.

formatunixtime
group_id: string

Identifier of the group that has access to the project.

group_name: string

Display name of the group.

group_type: string

The type of the group.

object: "project.group"

Always project.group.

project_id: string

Identifier of the project.

GroupDeleteResponse { deleted, object }

Confirmation payload returned after removing a group from a project.

deleted: boolean

Whether the group membership in the project was removed.

object: "project.group.deleted"

Always project.group.deleted.

ProjectsGroupsRoles

List project group role assignments
client.admin.organization.projects.groups.roles.list(stringgroupID, RoleListParams { project_id, after, limit, order } params, RequestOptionsoptions?): NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/projects/{project_id}/groups/{group_id}/roles
Assign project role to group
client.admin.organization.projects.groups.roles.create(stringgroupID, RoleCreateParams { project_id, role_id } params, RequestOptionsoptions?): RoleCreateResponse { group, object, role }
POST/projects/{project_id}/groups/{group_id}/roles
Unassign project role from group
client.admin.organization.projects.groups.roles.delete(stringroleID, RoleDeleteParams { project_id, group_id } params, RequestOptionsoptions?): RoleDeleteResponse { deleted, object }
DELETE/projects/{project_id}/groups/{group_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse { id, created_at, created_by, 8 more }

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

id: string

Identifier for the role.

created_at: number | null

When the role was created.

formatunixtime
created_by: string | null

Identifier of the actor who created the role.

created_by_user_obj: Record<string, unknown> | null

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

description: string | null

Description of the role.

metadata: Record<string, unknown> | null

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: Array<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 | null

When the role was last updated.

formatint64
RoleCreateResponse { group, object, role }

Role assignment linking a group to a role.

group: Group { id, created_at, name, 2 more }

Summary information about a group returned in role assignment responses.

id: string

Identifier for the group.

created_at: number

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

formatunixtime
name: string

Display name of the group.

object: "group"

Always group.

scim_managed: boolean

Whether the group is managed through SCIM.

object: "group.role"

Always group.role.

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

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

RoleDeleteResponse { 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.

ProjectsRoles

List project roles
client.admin.organization.projects.roles.list(stringprojectID, RoleListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<Role { id, description, name, 4 more } >
GET/projects/{project_id}/roles
Create project role
client.admin.organization.projects.roles.create(stringprojectID, RoleCreateParams { permissions, role_name, description } body, RequestOptionsoptions?): Role { id, description, name, 4 more }
POST/projects/{project_id}/roles
Update project role
client.admin.organization.projects.roles.update(stringroleID, RoleUpdateParams { project_id, description, permissions, role_name } params, RequestOptionsoptions?): Role { id, description, name, 4 more }
POST/projects/{project_id}/roles/{role_id}
Delete project role
client.admin.organization.projects.roles.delete(stringroleID, RoleDeleteParams { project_id } params, RequestOptionsoptions?): RoleDeleteResponse { id, deleted, object }
DELETE/projects/{project_id}/roles/{role_id}
ModelsExpand Collapse
RoleDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a role.

id: string

Identifier of the deleted role.

deleted: boolean

Whether the role was deleted.

object: "role.deleted"

Always role.deleted.

ProjectsCertificates

List project certificates
client.admin.organization.projects.certificates.list(stringprojectID, CertificateListParams { after, limit, order } query?, RequestOptionsoptions?): ConversationCursorPage<CertificateListResponse { id, active, certificate_details, 3 more } >
GET/organization/projects/{project_id}/certificates
Activate certificates for project
client.admin.organization.projects.certificates.activate(stringprojectID, CertificateActivateParams { certificate_ids } body, RequestOptionsoptions?): Page<CertificateActivateResponse { id, active, certificate_details, 3 more } >
POST/organization/projects/{project_id}/certificates/activate
Deactivate certificates for project
client.admin.organization.projects.certificates.deactivate(stringprojectID, CertificateDeactivateParams { certificate_ids } body, RequestOptionsoptions?): Page<CertificateDeactivateResponse { id, active, certificate_details, 3 more } >
POST/organization/projects/{project_id}/certificates/deactivate
ModelsExpand Collapse
CertificateListResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

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

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.project.certificate"

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

CertificateActivateResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

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

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.project.certificate"

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

CertificateDeactivateResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

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

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.project.certificate"

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