Sprints API
Manage sprints and sprint planning.
Sprints
Create a Sprint
POST /projects/:projectId/sprints
Create a new sprint for a project.
Request Body:
{
"name": "Sprint 1 - Authentication",
"goal": "Implement user authentication",
"startDate": "2024-01-15",
"endDate": "2024-01-29"
}
Response: 201 Created
{
"id": "sprint_xxx",
"projectId": "proj_xxx",
"name": "Sprint 1 - Authentication",
"goal": "Implement user authentication",
"status": "planning",
"startDate": "2024-01-15T00:00:00Z",
"endDate": "2024-01-29T00:00:00Z",
"createdAt": "2024-01-14T10:00:00Z"
}
List Sprints
GET /projects/:projectId/sprints
Get all sprints for a project.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: planning, active, completed, cancelled |
limit | number | Max results (default 20) |
offset | number | Pagination offset |
Response: 200 OK
[
{
"id": "sprint_xxx",
"name": "Sprint 1",
"status": "completed",
"goal": "User authentication"
},
{
"id": "sprint_yyy",
"name": "Sprint 2",
"status": "active",
"goal": "Dashboard features"
}
]
Get Active Sprint
GET /projects/:projectId/sprints/active
Get the currently active sprint for a project.
Response: 200 OK
Returns the active sprint or null if none.
Get Sprint by ID
GET /sprints/:sprintId
Response: 200 OK
{
"id": "sprint_xxx",
"projectId": "proj_xxx",
"name": "Sprint 1 - Authentication",
"goal": "Implement user authentication",
"status": "active",
"startDate": "2024-01-15T00:00:00Z",
"endDate": "2024-01-29T00:00:00Z",
"taskCount": 8,
"completedCount": 3
}
Update Sprint
PATCH /sprints/:sprintId
Request Body:
{
"name": "Sprint 1 - Auth & Onboarding",
"goal": "Authentication and user onboarding",
"endDate": "2024-02-02"
}
Delete Sprint
DELETE /sprints/:sprintId
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
force | boolean | Force delete even if active |
Response: 204 No Content
Start Sprint
POST /sprints/:sprintId/start
Change sprint status from planning to active.
Response: 200 OK
Complete Sprint
POST /sprints/:sprintId/complete
Mark the sprint as completed.
Response: 200 OK
Sprint Tasks
Get Sprint Tasks
GET /sprints/:sprintId/tasks
Get all tasks in a sprint.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by task status |
limit | number | Max results |
offset | number | Pagination offset |
Add Task to Sprint
POST /sprints/:sprintId/tasks
Request Body:
{
"taskId": "task_xxx"
}
Bulk Add Tasks
POST /sprints/:sprintId/tasks/bulk
Request Body:
{
"taskIds": ["task_xxx", "task_yyy", "task_zzz"]
}
Remove Task from Sprint
DELETE /sprints/:sprintId/tasks/:taskId
Sprint Metrics
Get Sprint Metrics
GET /sprints/:sprintId/metrics
Response: 200 OK
{
"totalTasks": 8,
"completedTasks": 3,
"inProgressTasks": 2,
"remainingTasks": 3,
"completionPercentage": 37.5,
"estimatedCompletion": "2024-01-28T00:00:00Z"
}
Get Burndown Data
GET /sprints/:sprintId/burndown
Response: 200 OK
[
{"date": "2024-01-15", "ideal": 8, "actual": 8},
{"date": "2024-01-16", "ideal": 7.5, "actual": 8},
{"date": "2024-01-17", "ideal": 7, "actual": 7},
{"date": "2024-01-18", "ideal": 6.5, "actual": 6}
]
Get Velocity History
GET /projects/:projectId/velocity
Get velocity across recent sprints.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
count | number | Number of sprints (default 6) |
Response: 200 OK
[
{"sprintId": "sprint_1", "name": "Sprint 1", "velocity": 21},
{"sprintId": "sprint_2", "name": "Sprint 2", "velocity": 24},
{"sprintId": "sprint_3", "name": "Sprint 3", "velocity": 19}
]
Backlog
Get Backlog
GET /projects/:projectId/backlog
Get tasks not assigned to any sprint.
Chat with Software Architect
POST /sprints/:sprintId/chat-with-dev-lead
Chat with the Software Architect agent about sprint tasks.
Request Body:
{
"message": "Should we add caching to the authentication endpoints?"
}
Response: 200 OK
{
"response": "For the authentication endpoints, I'd recommend adding caching for the user session validation, but not for login/logout operations..."
}
Planning Wizard
Initialize Wizard Session
POST /projects/:projectId/wizard/initialize
Start a new planning wizard session.
Request Body:
{
"repositoryId": "repo_xxx",
"goal": "Add user authentication with login and signup"
}
Response: 201 Created
{
"sessionId": "session_xxx",
"currentStep": {
"id": "step_1",
"question": "What authentication method should we use?",
"options": [
{"id": "jwt", "label": "JWT tokens"},
{"id": "session", "label": "Session-based"}
]
}
}
Submit Wizard Answer
POST /projects/:projectId/wizard/:sessionId/answer
Request Body:
{
"stepId": "step_1",
"selectedOptionIds": ["jwt"],
"customText": "We need refresh tokens too"
}
Get Wizard Session
GET /projects/:projectId/wizard/:sessionId
Get the current state of a wizard session.
Generate PRD
POST /projects/:projectId/wizard/generate-prd
Generate a product requirements document from wizard answers.
Generate Plan
POST /projects/:projectId/wizard/generate-plan
Generate a sprint plan from the PRD.
Generate Tasks
POST /projects/:projectId/wizard/generate-tasks
Generate detailed tasks from the plan.
Create Sprint from Wizard
POST /projects/:projectId/wizard/create-sprint
Create a sprint and all its tasks from wizard data.
Request Body:
{
"name": "Sprint 1 - Authentication",
"goal": "Implement user authentication",
"tasks": [
{
"title": "Create user model and migrations",
"description": "...",
"owner": "backend-engineer"
}
]
}
Response: 201 Created
{
"sprint": {
"id": "sprint_xxx",
"name": "Sprint 1 - Authentication"
},
"tasks": [
{"id": "task_xxx", "title": "Create user model and migrations"}
]
}
Finalize Wizard Session
POST /projects/:projectId/wizard/:sessionId/finalize
Finalize the wizard and create the sprint with all tasks.
Sprint Status Flow
planning → active → completed
↓
cancelled
- planning: Sprint created, tasks being prepared
- active: Sprint is running, agents executing tasks
- completed: All tasks finished
- cancelled: Sprint stopped before completion