Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

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
200

Todos successfully reordered

successboolean
400

Invalid projectId, itemId, or todo IDs in sort order

401

Unauthorized - Invalid or missing authentication token

403

Insufficient permissions or no access to project

404

Item not found or does not belong to the specified project

Try it
Server
Authorization
Parameters
Bodyapplication/json
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
}