Projects API
List projects
Section titled “List projects”GET /api/projectsReturns 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" }]Create project
Section titled “Create project”POST /api/projectsRequest 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 project
Section titled “Get project”GET /api/projects/{id}Returns the project with all its metadata.
Update project
Section titled “Update project”PUT /api/projects/{id}Request body
{ "name": "Updated Name", "instructions": "Updated instructions for Pilot"}Delete project
Section titled “Delete project”DELETE /api/projects/{id}Deletes the project and all associated conversations and tasks.
List project files
Section titled “List project files”GET /api/projects/{id}/filesReturns 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" }]Read project file
Section titled “Read project file”GET /api/projects/{id}/file?path=src/index.tsx&branch=mainReturns the content of a specific file from the project’s storage.
Merge task results
Section titled “Merge task results”POST /api/projects/{id}/merge-taskMerge the results of a completed task back into the project’s main branch.
Request body
{ "task_id": "task_abc123"}