Manage Projects

Create, list, update, and delete knowledge 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.

$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"
> }'
1{
2 "success": true,
3 "data": {
4 "id": "proj_abc123",
5 "name": "Safety Compliance Q4",
6 "description": "All safety documents for Q4 review",
7 "created_at": "2026-05-20T10:00:00Z",
8 "updated_at": "2026-05-20T10:00:00Z"
9 },
10 "request_id": "..."
11}

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

List projects

Retrieve all projects in your organization:

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

Get a single project

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

Update a project

$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

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

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

What’s next