Skip to content

Projects API

GET /api/projects

Returns all projects in the current workspace.

Response 200 OK

[
{
"id": "proj_abc123",
"name": "my-app",
"github_repo": "octocat/my-app",
"github_branch": "main",
"color": "#4f46e5",
"icon": "rocket",
"created_at": "2025-01-15T10:00:00Z"
}
]
POST /api/projects

Request body

{
"name": "my-app",
"instructions": "Next.js app with TypeScript. Use Tailwind for styling.",
"github_repo": "octocat/my-app",
"github_branch": "main",
"color": "#4f46e5",
"icon": "rocket"
}

Response 201 Created

GET /api/projects/{id}

Returns the project with all its metadata.

PUT /api/projects/{id}

Request body

{
"name": "Updated Name",
"instructions": "Updated instructions for Pilot"
}
DELETE /api/projects/{id}

Deletes the project and all associated conversations and tasks.

GET /api/projects/{id}/files

Returns files tracked for the project, organized by branch.

Response 200 OK

[
{
"id": "file_1",
"path": "src/index.tsx",
"mime_type": "text/tsx",
"size_bytes": 1234,
"branch": "main",
"created_at": "2025-01-15T10:00:00Z"
}
]
GET /api/projects/{id}/file?path=src/index.tsx&branch=main

Returns the content of a specific file from the project’s storage.

POST /api/projects/{id}/merge-task

Merge the results of a completed task back into the project’s main branch.

Request body

{
"task_id": "task_abc123"
}