Delete project
Delete project: deleteProject in the TypeScript, Python, Rust and Go clients.
DELETE /v1/projects/{projectId}
Starts deletion of the identified project using a credential authorized for project management. Inspect the documented response and use getProjectClosureStatus with the organization and project identifiers to read closure progress. A project API key is not an accepted credential for this operation.
photon.projects.delete(input: DeleteProjectInput, options?: RequestOptions): Promise<DeleteProjectOutput>photon.projects.delete(input: DeleteProjectInput, *, options: RequestOptions | None = None) -> models.Projectclient.delete_project(idempotency_key: String, project_id: String).await -> Result<ResponseValue<types::Project>, Error<DeleteProjectError>>client.Projects.Delete(ctx context.Context, params *DeleteProjectParams, 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.delete({
path: {
projectId: "projectId",
},
headers: {
idempotencyKey: "idempotencyKey",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import DeleteProjectInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.delete(
DeleteProjectInput.model_validate({
"path": {
"projectId": "projectId",
},
"headers": {
"Idempotency-Key": "idempotencyKey",
},
})
)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
.delete_project("idempotencyKey".to_owned(), "projectId".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.Delete(ctx, &photonapi.DeleteProjectParams{
IdempotencyKey: "idempotencyKey",
ProjectID: "projectId",
})
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.
Returns
200 The deleted project tombstone. Project
Headers: Photon-Version. The raw response carries these headers; see Raw responses.