Reorder questions within a component item
Reorders questions within a component item by providing a new sort order array of question IDs. The sort order determines the display order of questions in the UI and affects condition evaluation order. All questions for the item must be included in the newSortOrder array.
POST
/projects/{projectId}/items/{itemId}/questions/sortAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredProject UUID
itemIdstringrequiredComponent item UUID. Items are the building blocks within components (Epics, Work Packages, Todo Lists, Test Suites).
Request body
requiredapplication/jsonnewSortOrderstring[]requiredArray of question IDs in new order. All questions for the item must be included.
Responses
200Questions reordered successfully
successboolean400Invalid UUID format or failed to sort questions
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to manage components or access to project denied
404Item not found or does not belong to a component in the project, or question IDs not found in the item
422Incomplete sort order: not all questions for the item are included in newSortOrder
Request
curl -X POST "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/3047983b-d798-4aff-8dd4-628cf1900703/questions/sort" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"newSortOrder": [
"f68ed48c-8704-5e17-c5ad-28195c884b00",
"a47dc37b-7693-4d06-b49c-17084b773aff"
]
}'const response = await fetch("https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/3047983b-d798-4aff-8dd4-628cf1900703/questions/sort", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"newSortOrder": [
"f68ed48c-8704-5e17-c5ad-28195c884b00",
"a47dc37b-7693-4d06-b49c-17084b773aff"
]
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/3047983b-d798-4aff-8dd4-628cf1900703/questions/sort",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"newSortOrder": [
"f68ed48c-8704-5e17-c5ad-28195c884b00",
"a47dc37b-7693-4d06-b49c-17084b773aff"
]
},
)Response
{
"success": true
}Invalid UUID format or failed to sort questions
Unauthorized - Invalid or missing authentication token
Insufficient permissions to manage components or access to project denied
Item not found or does not belong to a component in the project, or question IDs not found in the item
Incomplete sort order: not all questions for the item are included in newSortOrder