End a cycle and carry its unfinished work forward (idempotent)
POST/api/cycles/{cycle_id}/complete
completeCycle
Completing a cycle used to set `completed_at` and nothing else, which left every unfinished issue pointing at a window that had closed. It now moves them, in the same transaction, to the team's next cycle — or unbinds them when there is none. The response reports what was moved and where; `GET /api/cycles/{cycle_id}/carryover` answers the same question before the write. Re-completing an already-complete cycle moves nothing and says so.
Requires authentication using a bearer token or a session cookie — see tokens and scopes.
curl
curl -X POST 'https://neosource.dev/api/cycles/CYCLE_ID/complete' \
-H 'Authorization: Bearer $NEOSOURCE_TOKEN'fetch
fetch("https://neosource.dev/api/cycles/CYCLE_ID/complete", {
method: "POST",
headers: {
Authorization: "Bearer $NEOSOURCE_TOKEN",
},
});Path parameters
cycle_idrequired
Responses
200Cycle completed
application/json
403Forbidden — one of: forbidden, needs_scope
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 401Authentication required
- 404Not Found — one of: not_found
- 409Conflict — one of: already_exists, conflict
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget
Schemas
Referenced above. Listed here rather than expanded inline, so the same definition is not repeated at every level.
CycleRef
Just enough of a cycle to name it in a sentence about another cycle.
cycle_idrequirednamerequired
CycleProgressResponse
How much work a cycle holds and how far through it the team is. Present on EVERY cycle payload, not just the listing: a surface that has a cycle in hand should never have to ask a second endpoint whether it contains anything. The four numbers are computed over one set — every live issue bound to the cycle — which is the same set the cycle's issue listing returns and the same set completing the cycle carries over, so a progress bar can never describe a different cycle from the rows under it. `started` and `blocked` overlap each other and both sit inside `total - done`; they are two views of the unfinished remainder rather than a partition, and are reported as such.
blockedrequired...flagged blocked and unfinished.
donerequired...in a terminal status (`done` / `cancelled` / `duplicate`).
startedrequired...started and unfinished: `in_progress` or `in_review`.
totalrequiredLive issues bound to this cycle.