Update project
Update project: updateProject in the TypeScript, Python, Rust and Go clients.
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>photon.projects.update(input: UpdateProjectInput, *, options: RequestOptions | None = None) -> models.Projectclient.update_project(idempotency_key: String, project_id: String, body: &types::UpdateProjectRequest).await -> Result<ResponseValue<types::Project>, Error<UpdateProjectError>>client.Projects.Update(ctx context.Context, params *UpdateProjectParams, opts ...RequestOption) (*Project, error)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",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import UpdateProjectInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.update(
UpdateProjectInput.model_validate({
"path": {
"projectId": "projectId",
},
"headers": {
"Idempotency-Key": "idempotencyKey",
},
"body": {
"name": "name",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.update_project(
"idempotencyKey".to_owned(),
"projectId".to_owned(),
&serde_json::from_value(serde_json::json!({
"name": "name",
}))?,
)
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"encoding/json"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
var body photonapi.UpdateProjectRequest
if err := json.Unmarshal([]byte(`{
"name": "name"
}`), &body); err != nil {
return err
}
result, err := client.Projects.Update(ctx, &photonapi.UpdateProjectParams{
IdempotencyKey: "idempotencyKey",
ProjectID: "projectId",
Body: body,
})
if err != nil {
return err
}
_ = result{
"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
Selects the API contract date. Without it, the request is served as 2026-07-01.
Identifies one logical mutation across retries.
Body
Returns
200 The updated project. Project
Headers: Photon-Version. The raw response carries these headers; see Raw responses.