Projects API
Manage projects and workspaces programmatically.
Endpoints
GET /api/projects
List all projects for the authenticated user.
Response:
{
  "projects": [
    {
      "id": "proj_123",
      "name": "My Awesome App",
      "slug": "my-awesome-app",
      "framework": "sveltekit",
      "visibility": "private",
      "lastOpenedAt": "2024-01-01T00:00:00Z",
      "workspace": {
        "id": "ws_123",
        "name": "Personal Workspace"
      }
    }
  ]
} POST /api/projects
Create a new project.
Request Body:
{
  "name": "New Project",
  "description": "A new amazing project",
  "framework": "react",
  "visibility": "private"
} GET /api/projects/:id
Get project details including files.
PUT /api/projects/:id
Update project settings.
DELETE /api/projects/:id
Delete a project permanently.
Project Files
GET /api/projects/:id/files
List all files in a project.
POST /api/projects/:id/files
Create or update a file.
DELETE /api/projects/:id/files
Delete a file from the project.