Projects API
Manage semantic version control projects.
Create Project
POST /api/v1/projects
Request
{
"name": "my-project",
"description": "Optional description"
}
Response
{
"id": "proj_abc123",
"name": "my-project",
"description": "Optional description",
"created_at": "2024-01-15T10:00:00Z"
}
Example
curl -X POST http://localhost:8000/api/v1/projects \
-H "Content-Type: application/json" \
-d '{"name": "japan-trip"}'
List Projects
GET /api/v1/projects
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | int | Max results (default: 50) |
offset | int | Skip results (default: 0) |
Response
{
"projects": [
{
"id": "proj_abc123",
"name": "japan-trip",
"created_at": "2024-01-15T10:00:00Z"
}
],
"total": 1
}
Example
curl "http://localhost:8000/api/v1/projects?limit=10"
Get Project
GET /api/v1/projects/{project_id}
Response
{
"id": "proj_abc123",
"name": "japan-trip",
"description": null,
"created_at": "2024-01-15T10:00:00Z",
"stats": {
"turns": 24,
"commits": 3,
"branches": 2,
"conversations": 1
}
}
Example
curl http://localhost:8000/api/v1/projects/proj_abc123
Delete Project
DELETE /api/v1/projects/{project_id}
warning
This permanently deletes the project and all associated data (turns, commits, branches, drafts).
Response
{
"message": "Project deleted",
"id": "proj_abc123"
}
Example
curl -X DELETE http://localhost:8000/api/v1/projects/proj_abc123