Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Sort todos within an item

Reorders todos within a component item by providing a new sort order array. The sort order determines the display order of todos in the UI and affects condition evaluation order. All todos in the newSortOrder array must belong to the specified item. This operation automatically recalculates conditions if needed and marks the project configuration as changed.

POST/projects/{projectId}/items/{itemId}/todos/sort
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
Project UUID
itemIdstringrequired
Component item UUID
Request body
requiredapplication/json
newSortOrderstring[]required
Array of todo item IDs in the desired sort order
Responses
200Todos successfully reordered
successboolean
400Invalid projectId, itemId, or todo IDs in sort order
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions or no access to project
404Item not found or does not belong to the specified project
Request
curl -X POST "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/todos/sort" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "newSortOrder": [
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "b2c3d4e5-f6g7-8901-bcde-f12345678901"
  ]
}'
Response
{
  "success": true
}