Toggle todo completion status
Toggles the completion status of a todo item within a project component item. Updates the isDone status, sets doneBy to the current user, and updates doneUpdatedAt timestamp. This endpoint uses the processComponentsTodos permission, allowing users to toggle todo completion without requiring full component management permissions. After toggling, the system recalculates conditions and marks the project configuration as changed.
POST
/projects/{projectId}/items/{itemId}/todos/{id}/toggleAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredProject UUID
itemIdstringrequiredComponent item UUID (the item that contains the todo)
idstringrequiredTodo UUID
Request body
requiredapplication/jsonisDonebooleanrequiredWhether the todo should be marked as done (true) or not done (false)
Responses
200Todo completion status toggled successfully
successboolean400Invalid UUID format or missing isDone field
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions or no access to project
404Todo not found or does not belong to a component item in the specified project
Request
curl -X POST "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/b58dc37b-7693-4d06-b49c-17084b773aff/todos/c69dc37b-7693-4d06-b49c-17084b773aff/toggle" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"isDone": true
}'const response = await fetch("https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/b58dc37b-7693-4d06-b49c-17084b773aff/todos/c69dc37b-7693-4d06-b49c-17084b773aff/toggle", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"isDone": true
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/b58dc37b-7693-4d06-b49c-17084b773aff/todos/c69dc37b-7693-4d06-b49c-17084b773aff/toggle",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"isDone": True
},
)Response
{
"success": true
}Invalid UUID format or missing isDone field
Unauthorized - Invalid or missing authentication token
Insufficient permissions or no access to project
Todo not found or does not belong to a component item in the specified project