> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://documents.pyramid-ai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://documents.pyramid-ai.com/_mcp/server.

# Manage Projects

## Before you begin

* You have an API key (`pai_test_*` for staging or `pai_live_*` for production)
* Feature `api.projects` is enabled for your organization

## Create a project

Projects are containers for documents and knowledge. Every document belongs to a project.

```bash
curl -X POST https://api-staging.pyramid-ai.com/api/v2/projects \
  -H "Authorization: Bearer pai_test_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Safety Compliance Q4",
    "description": "All safety documents for Q4 review"
  }'
```

```json
{
  "success": true,
  "data": {
    "id": "proj_abc123",
    "name": "Safety Compliance Q4",
    "description": "All safety documents for Q4 review",
    "created_at": "2026-05-20T10:00:00Z",
    "updated_at": "2026-05-20T10:00:00Z"
  },
  "request_id": "..."
}
```

Save the `id` — you'll use it when uploading documents and running queries.

## List projects

Retrieve all projects in your organization:

```bash
curl https://api-staging.pyramid-ai.com/api/v2/projects \
  -H "Authorization: Bearer pai_test_YOUR_KEY_HERE"
```

## Get a single project

```bash
curl https://api-staging.pyramid-ai.com/api/v2/projects/PROJECT_ID \
  -H "Authorization: Bearer pai_test_YOUR_KEY_HERE"
```

## Update a project

```bash
curl -X PATCH https://api-staging.pyramid-ai.com/api/v2/projects/PROJECT_ID \
  -H "Authorization: Bearer pai_test_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"name": "Safety Compliance Q4 — Final"}'
```

Only the fields you include will be updated.

## Delete a project

```bash
curl -X DELETE https://api-staging.pyramid-ai.com/api/v2/projects/PROJECT_ID \
  -H "Authorization: Bearer pai_test_YOUR_KEY_HERE"
```

> **Warning**
>
> A project cannot be deleted while it still contains documents. Remove all documents first, then delete the project.

## What's next

* [Upload Documents](/howto/documents) — add documents to your project
* [Ask a Question](/howto/agent) — query your project knowledge