Skip to navigation

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"
}'
{
"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:

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