---
title: "Create a project"
method: POST
path: "/api/v1/public/projects"
tags: ["Account"]
---

# Create a project

`POST /api/v1/public/projects`

## Request

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

Create a project in a workspace the authenticated user can write to.

Requires MEMBER role or higher in the workspace (the write service decides).
Idempotent on the project name within the workspace.

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.
    payload (CreateProjectRequest): The project to create.
    _live (None): Write-path liveness gate (blocks a revoked JWT session).

Returns:
    CreateProjectResponse: The created (or matched) project.

## Request body

- CreateProjectRequest: Body for creating a project inside a workspace.
  - `name` string, required
  - `trace_ttl_days` integer, nullable
  - `workspace_id` string, required

## Response `200`

Successful Response

- CreateProjectResponse: The created (or idempotently matched) project.
  - `created` boolean, required
  - `id` string, required
  - `name` string, required
  - `workspace_id` 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)
