Skip to content
Primary navigation

Projects

List projects
client.Admin.Organization.Projects.List(ctx, query) (*ConversationCursorPage[Project], error)
GET/organization/projects
Create project
client.Admin.Organization.Projects.New(ctx, body) (*Project, error)
POST/organization/projects
Retrieve project
client.Admin.Organization.Projects.Get(ctx, projectID) (*Project, error)
GET/organization/projects/{project_id}
Modify project
client.Admin.Organization.Projects.Update(ctx, projectID, body) (*Project, error)
POST/organization/projects/{project_id}
Archive project
client.Admin.Organization.Projects.Archive(ctx, projectID) (*Project, error)
POST/organization/projects/{project_id}/archive
ModelsExpand Collapse
type Project struct{…}

Represents an individual project.

ID string

The identifier, which can be referenced in API endpoints

CreatedAt int64

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

formatunixtime
Object OrganizationProject

The object type, which is always organization.project

ArchivedAt int64Optional

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

formatunixtime
ExternalKeyID stringOptional

The external key associated with the project.

Name stringOptional

The name of the project. This appears in reporting.

Status stringOptional

active or archived

ProjectsUsers

List project users
client.Admin.Organization.Projects.Users.List(ctx, projectID, query) (*ConversationCursorPage[ProjectUser], error)
GET/organization/projects/{project_id}/users
Create project user
client.Admin.Organization.Projects.Users.New(ctx, projectID, body) (*ProjectUser, error)
POST/organization/projects/{project_id}/users
Retrieve project user
client.Admin.Organization.Projects.Users.Get(ctx, projectID, userID) (*ProjectUser, error)
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
client.Admin.Organization.Projects.Users.Update(ctx, projectID, userID, body) (*ProjectUser, error)
POST/organization/projects/{project_id}/users/{user_id}
Delete project user
client.Admin.Organization.Projects.Users.Delete(ctx, projectID, userID) (*AdminOrganizationProjectUserDeleteResponse, error)
DELETE/organization/projects/{project_id}/users/{user_id}
ModelsExpand Collapse
type ProjectUser struct{…}

Represents an individual user in a project.

ID string

The identifier, which can be referenced in API endpoints

AddedAt int64

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

formatunixtime
Object OrganizationProjectUser

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

Role string

owner or member

Email stringOptional

The email address of the user

Name stringOptional

The name of the user

ProjectsUsersRoles

List project user role assignments
client.Admin.Organization.Projects.Users.Roles.List(ctx, projectID, userID, query) (*NextCursorPage[AdminOrganizationProjectUserRoleListResponse], error)
GET/projects/{project_id}/users/{user_id}/roles
Assign project role to user
client.Admin.Organization.Projects.Users.Roles.New(ctx, projectID, userID, body) (*AdminOrganizationProjectUserRoleNewResponse, error)
POST/projects/{project_id}/users/{user_id}/roles
Unassign project role from user
client.Admin.Organization.Projects.Users.Roles.Delete(ctx, projectID, userID, roleID) (*AdminOrganizationProjectUserRoleDeleteResponse, error)
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}

ProjectsService Accounts

List project service accounts
client.Admin.Organization.Projects.ServiceAccounts.List(ctx, projectID, query) (*ConversationCursorPage[ProjectServiceAccount], error)
GET/organization/projects/{project_id}/service_accounts
Create project service account
client.Admin.Organization.Projects.ServiceAccounts.New(ctx, projectID, body) (*AdminOrganizationProjectServiceAccountNewResponse, error)
POST/organization/projects/{project_id}/service_accounts
Retrieve project service account
client.Admin.Organization.Projects.ServiceAccounts.Get(ctx, projectID, serviceAccountID) (*ProjectServiceAccount, error)
GET/organization/projects/{project_id}/service_accounts/{service_account_id}
Delete project service account
client.Admin.Organization.Projects.ServiceAccounts.Delete(ctx, projectID, serviceAccountID) (*AdminOrganizationProjectServiceAccountDeleteResponse, error)
DELETE/organization/projects/{project_id}/service_accounts/{service_account_id}
ModelsExpand Collapse
type ProjectServiceAccount struct{…}

Represents an individual service account in a project.

ID string

The identifier, which can be referenced in API endpoints

CreatedAt int64

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

formatunixtime
Name string

The name of the service account

Object OrganizationProjectServiceAccount

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

Role ProjectServiceAccountRole

owner or member

One of the following:
const ProjectServiceAccountRoleOwner ProjectServiceAccountRole = "owner"
const ProjectServiceAccountRoleMember ProjectServiceAccountRole = "member"

ProjectsAPI Keys

List project API keys
client.Admin.Organization.Projects.APIKeys.List(ctx, projectID, query) (*ConversationCursorPage[ProjectAPIKey], error)
GET/organization/projects/{project_id}/api_keys
Retrieve project API key
client.Admin.Organization.Projects.APIKeys.Get(ctx, projectID, apiKeyID) (*ProjectAPIKey, error)
GET/organization/projects/{project_id}/api_keys/{api_key_id}
Delete project API key
client.Admin.Organization.Projects.APIKeys.Delete(ctx, projectID, apiKeyID) (*AdminOrganizationProjectAPIKeyDeleteResponse, error)
DELETE/organization/projects/{project_id}/api_keys/{api_key_id}
ModelsExpand Collapse
type ProjectAPIKey struct{…}

Represents an individual API key in a project.

ID string

The identifier, which can be referenced in API endpoints

CreatedAt int64

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

formatunixtime
LastUsedAt int64

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

formatunixtime
Name string

The name of the API key

Object OrganizationProjectAPIKey

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

Owner ProjectAPIKeyOwner
ServiceAccount ProjectAPIKeyOwnerServiceAccountOptional

The service account that owns a project API key.

ID string

The identifier, which can be referenced in API endpoints

CreatedAt int64

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 stringOptional

user or service_account

One of the following:
const ProjectAPIKeyOwnerTypeUser ProjectAPIKeyOwnerType = "user"
const ProjectAPIKeyOwnerTypeServiceAccount ProjectAPIKeyOwnerType = "service_account"
User ProjectAPIKeyOwnerUserOptional

The user that owns a project API key.

ID string

The identifier, which can be referenced in API endpoints

CreatedAt int64

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.

RedactedValue string

The redacted value of the API key

ProjectsRate Limits

List project rate limits
client.Admin.Organization.Projects.RateLimits.ListRateLimits(ctx, projectID, query) (*ConversationCursorPage[ProjectRateLimit], error)
GET/organization/projects/{project_id}/rate_limits
Modify project rate limit
client.Admin.Organization.Projects.RateLimits.UpdateRateLimit(ctx, projectID, rateLimitID, body) (*ProjectRateLimit, error)
POST/organization/projects/{project_id}/rate_limits/{rate_limit_id}
ModelsExpand Collapse
type ProjectRateLimit struct{…}

Represents a project rate limit config.

ID string

The identifier, which can be referenced in API endpoints.

MaxRequestsPer1Minute int64

The maximum requests per minute.

MaxTokensPer1Minute int64

The maximum tokens per minute.

Model string

The model this rate limit applies to.

Object ProjectRateLimit

The object type, which is always project.rate_limit

Batch1DayMaxInputTokens int64Optional

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

MaxAudioMegabytesPer1Minute int64Optional

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

MaxImagesPer1Minute int64Optional

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

MaxRequestsPer1Day int64Optional

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

ProjectsGroups

List project groups
client.Admin.Organization.Projects.Groups.List(ctx, projectID, query) (*NextCursorPage[ProjectGroup], error)
GET/organization/projects/{project_id}/groups
Add project group
client.Admin.Organization.Projects.Groups.New(ctx, projectID, body) (*ProjectGroup, error)
POST/organization/projects/{project_id}/groups
Remove project group
client.Admin.Organization.Projects.Groups.Delete(ctx, projectID, groupID) (*AdminOrganizationProjectGroupDeleteResponse, error)
DELETE/organization/projects/{project_id}/groups/{group_id}
ModelsExpand Collapse
type ProjectGroup struct{…}

Details about a group’s membership in a project.

CreatedAt int64

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

formatunixtime
GroupID string

Identifier of the group that has access to the project.

GroupName string

Display name of the group.

GroupType string

The type of the group.

Object ProjectGroup

Always project.group.

ProjectID string

Identifier of the project.

ProjectsGroupsRoles

List project group role assignments
client.Admin.Organization.Projects.Groups.Roles.List(ctx, projectID, groupID, query) (*NextCursorPage[AdminOrganizationProjectGroupRoleListResponse], error)
GET/projects/{project_id}/groups/{group_id}/roles
Assign project role to group
client.Admin.Organization.Projects.Groups.Roles.New(ctx, projectID, groupID, body) (*AdminOrganizationProjectGroupRoleNewResponse, error)
POST/projects/{project_id}/groups/{group_id}/roles
Unassign project role from group
client.Admin.Organization.Projects.Groups.Roles.Delete(ctx, projectID, groupID, roleID) (*AdminOrganizationProjectGroupRoleDeleteResponse, error)
DELETE/projects/{project_id}/groups/{group_id}/roles/{role_id}

ProjectsRoles

List project roles
client.Admin.Organization.Projects.Roles.List(ctx, projectID, query) (*NextCursorPage[Role], error)
GET/projects/{project_id}/roles
Create project role
client.Admin.Organization.Projects.Roles.New(ctx, projectID, body) (*Role, error)
POST/projects/{project_id}/roles
Update project role
client.Admin.Organization.Projects.Roles.Update(ctx, projectID, roleID, body) (*Role, error)
POST/projects/{project_id}/roles/{role_id}
Delete project role
client.Admin.Organization.Projects.Roles.Delete(ctx, projectID, roleID) (*AdminOrganizationProjectRoleDeleteResponse, error)
DELETE/projects/{project_id}/roles/{role_id}

ProjectsCertificates

List project certificates
client.Admin.Organization.Projects.Certificates.List(ctx, projectID, query) (*ConversationCursorPage[AdminOrganizationProjectCertificateListResponse], error)
GET/organization/projects/{project_id}/certificates
Activate certificates for project
client.Admin.Organization.Projects.Certificates.Activate(ctx, projectID, body) (*Page[AdminOrganizationProjectCertificateActivateResponse], error)
POST/organization/projects/{project_id}/certificates/activate
Deactivate certificates for project
client.Admin.Organization.Projects.Certificates.Deactivate(ctx, projectID, body) (*Page[AdminOrganizationProjectCertificateDeactivateResponse], error)
POST/organization/projects/{project_id}/certificates/deactivate