Sprints API
All endpoints require authentication and sprints tool permissions.
List Sprints
Section titled “List Sprints”GET /api/sprintsQuery parameters:
| Param | Type | Description |
|---|---|---|
project_id | string | Filter by project ID |
status | string | Filter by sprint status |
Response: { sprints }
Each sprint includes computed task_count and done_count fields. Results are ordered by position, then start_date, then created_at.
Get Sprint Detail
Section titled “Get Sprint Detail”GET /api/sprints/:idReturns { sprint, tasks, backlog } where:
sprintis the full sprint recordtasksare top-level tasks assigned to this sprint (excludes subtasks), each withassignee_name,assignee_picture,status_label,status_color,status_value,priority_label,priority_colorbacklogcontains up to 50 unassigned top-level tasks from the same project (wheresprint_id IS NULL), each withassignee_name,status_label,status_color,status_value
Errors:
| Status | Body |
|---|---|
| 404 | { error: "Not found" } |
Create Sprint
Section titled “Create Sprint”POST /api/sprintsRequires update permission.
Body:
{ "project_id": "string (required)", "name": "string (required)", "goal": "string (optional)", "start_date": "string (optional, ISO date)", "end_date": "string (optional, ISO date)", "position": "number (optional, default: 0)"}Response: { sprint } with status 201.
Errors:
| Status | Body |
|---|---|
| 400 | { error: "project_id and name required" } |
Update Sprint
Section titled “Update Sprint”PUT /api/sprints/:idRequires update permission.
Body: Any combination of the following fields:
| Field | Type | Description |
|---|---|---|
name | string | Sprint name |
goal | string | Sprint goal |
status | string | Sprint status |
start_date | string | Start date (ISO) |
end_date | string | End date (ISO) |
position | number | Display order |
Sets updated_at automatically on every update.
Response: { sprint }
Errors:
| Status | Body |
|---|---|
| 400 | { error: "No fields" } |
| 404 | { error: "Not found" } |
Delete Sprint
Section titled “Delete Sprint”DELETE /api/sprints/:idRequires manage permission.
Unassigns all tasks from the sprint (sets sprint_id = NULL) before deleting the sprint record.
Response: { ok: true }
Assign Task to Sprint
Section titled “Assign Task to Sprint”POST /api/sprints/:id/tasks/:taskIdRequires update permission.
Sets the task’s sprint_id to the given sprint.
Response: { ok: true }
Remove Task from Sprint
Section titled “Remove Task from Sprint”DELETE /api/sprints/:id/tasks/:taskIdRequires update permission.
Clears the task’s sprint_id (sets to NULL), moving it back to the project backlog.
Response: { ok: true }