---
title: "Delete a project"
method: DELETE
path: "/api/v1/public/projects/{project_id}"
tags: ["Account"]
---

# Delete a project

`DELETE /api/v1/public/projects/{project_id}`

## Request

- Base URL: `https://app.traceroot.ai`
- URL: `https://app.traceroot.ai/api/v1/public/projects/{project_id}`
- Auth: HTTP bearer

Soft-delete a project.

Requires ADMIN role in the project's workspace (the write service
decides). The project drops out of every list and read and its access
keys stop authenticating; its data stays for the retention window.

Args:
    request (Request): Incoming request (rate-limit plumbing).
    response (Response): Outgoing response (rate-limit plumbing).
    auth (AccountStampedAuth): Account-scope user auth (session token or
        CLI access JWT); its resolved ``user_id`` becomes the actor.
    project_id (str): The project to delete.
    reason (str): Why it is being deleted; recorded on the audit row.
    _live (None): Write-path liveness gate (blocks a revoked JWT session).

Returns:
    DeleteProjectResponse: The removed project.

Raises:
    HTTPException: The write service's 400/403/404 verbatim, or a 503
        when its response is ambiguous.

## Path parameters

- `project_id` string, required

## Query parameters

- `reason` string, required: Why the resource is being deleted; recorded on the audit row

## Response `200`

Successful Response

- DeleteProjectResponse: A soft-deleted project (its data stays for the retention window).
  - `deleted` boolean, required
  - `project` DeletedResource, required: What a delete removed: the row's id and name, for the receipt.
    - `id` string, required
    - `name` string, required
  - `reason` string, required

## Other responses

- `400`: Invalid request
- `401`: Authentication failed or session revoked
- `403`: Insufficient role or wrong credential kind
- `404`: Not found
- `422`: Validation Error
- `503`: Write service unavailable

---

[API](https://skmtc.dev/traceroot/apis/traceroot-public-api.md) - [All operations](https://skmtc.dev/traceroot/apis/traceroot-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traceroot/apis/traceroot-public-api/revisions/ce6aef96c0d6?raw)
