Skip to content

PATCH /v1/projects/{projectId}

Updates the identified project's name and returns the updated project. The project slug is not a mutable field in this request. Use an authorized account or organization service-identity credential; a project API key is not accepted. Supply the required Idempotency-Key header.

photon.projects.update(input: UpdateProjectInput, options?: RequestOptions): Promise<UpdateProjectOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.update({
  path: {
    projectId: "projectId",
  },
  headers: {
    idempotencyKey: "idempotencyKey",
  },
  body: {
    name: "name",
  },
});
{
  "agentProfile": {
    "avatarUrl": "https://example.com",
    "firstName": "string",
    "lastName": null
  },
  "billingInitialization": "pending",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "deletedAt": null,
  "name": "string",
  "organizationId": "string",
  "projectId": "string",
  "slug": "string",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

Parameters

Photon-VersionPhotonVersion

Selects the API contract date. Without it, the request is served as 2026-07-01.

Idempotency-Keystringrequired

Identifies one logical mutation across retries.

projectIdstringrequired

Body

namestringrequired

Returns

200 The updated project. Project

Headers: Photon-Version. The raw response carries these headers; see Raw responses.

agentProfileAgentProfilerequired
billingInitializationProjectBillingInitialization
createdAtstring (date-time)required
deletedAtstring (date-time) | nullrequired
namestringrequired
organizationIdstringrequired
projectIdstringrequired
slugstringrequired
updatedAtstring (date-time)required