Skip to content

Sprints API

All endpoints require authentication and sprints tool permissions.

GET /api/sprints

Query parameters:

ParamTypeDescription
project_idstringFilter by project ID
statusstringFilter 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 /api/sprints/:id

Returns { sprint, tasks, backlog } where:

  • sprint is the full sprint record
  • tasks are top-level tasks assigned to this sprint (excludes subtasks), each with assignee_name, assignee_picture, status_label, status_color, status_value, priority_label, priority_color
  • backlog contains up to 50 unassigned top-level tasks from the same project (where sprint_id IS NULL), each with assignee_name, status_label, status_color, status_value

Errors:

StatusBody
404{ error: "Not found" }
POST /api/sprints

Requires 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:

StatusBody
400{ error: "project_id and name required" }
PUT /api/sprints/:id

Requires update permission.

Body: Any combination of the following fields:

FieldTypeDescription
namestringSprint name
goalstringSprint goal
statusstringSprint status
start_datestringStart date (ISO)
end_datestringEnd date (ISO)
positionnumberDisplay order

Sets updated_at automatically on every update.

Response: { sprint }

Errors:

StatusBody
400{ error: "No fields" }
404{ error: "Not found" }
DELETE /api/sprints/:id

Requires manage permission.

Unassigns all tasks from the sprint (sets sprint_id = NULL) before deleting the sprint record.

Response: { ok: true }

POST /api/sprints/:id/tasks/:taskId

Requires update permission.

Sets the task’s sprint_id to the given sprint.

Response: { ok: true }

DELETE /api/sprints/:id/tasks/:taskId

Requires update permission.

Clears the task’s sprint_id (sets to NULL), moving it back to the project backlog.

Response: { ok: true }