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

Modify project

client.admin.organization.projects.update(projectID, body, options?): Project { id, created_at, object, 5 more }
POST
/organization/projects/{project_id}

Modifies a project in the organization.

Parameters
projectID: string
body: ProjectUpdateParams { external_key_id, geography, name }
Returns
Project { id, created_at, object, 5 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.

residency?: ProjectResidency

The residency configuration for the project.

status?: string | null

active or archived

Modify project

import OpenAI from 'openai';

const client = new OpenAI({
  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});

const project = await client.admin.organization.projects.update('project_id');

console.log(project.id);
200 example
{
  "id": "id",
  "created_at": 0,
  "object": "organization.project",
  "archived_at": 0,
  "external_key_id": "external_key_id",
  "name": "name",
  "residency": "GLOBAL",
  "status": "status"
}
Returns Examples
200 example
{
  "id": "id",
  "created_at": 0,
  "object": "organization.project",
  "archived_at": 0,
  "external_key_id": "external_key_id",
  "name": "name",
  "residency": "GLOBAL",
  "status": "status"
}