Add a comment to a todo in a project component item
Adds or updates a comment on a todo item within a project component item. Todos are checklist items that can be marked as complete and have comments. The comment content is provided in HTML or Markdown format and converted to internal IDoc format. Uses the processComponentsTodos permission, allowing users to comment on todos without full component edit access. The system automatically recalculates project conditions and sets the project configurationChanged flag after adding a comment.
POST
/projects/{projectId}/items/{itemId}/todos/{id}/commentAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredProject UUID
itemIdstringrequiredComponent Item UUID
idstringrequiredTodo UUID
Request body
requiredapplication/jsontodoCommentstringrequiredTodo comment content in HTML or Markdown format. Will be converted to internal IDoc format.
Responses
200Comment added successfully
400Invalid request: invalid UUID format or missing todoComment field
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions (processComponentsTodos) or access to project denied
404Todo not found or todo does not belong to the component item in the project
Request
curl -X POST "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/d47dc37b-7693-4d06-b49c-17084b773aff/todos/e57dc37b-7693-4d06-b49c-17084b773aff/comment" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"todoComment": "<p>This is a comment on the todo item</p>"
}'const response = await fetch("https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/d47dc37b-7693-4d06-b49c-17084b773aff/todos/e57dc37b-7693-4d06-b49c-17084b773aff/comment", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"todoComment": "<p>This is a comment on the todo item</p>"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/d47dc37b-7693-4d06-b49c-17084b773aff/todos/e57dc37b-7693-4d06-b49c-17084b773aff/comment",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"todoComment": "<p>This is a comment on the todo item</p>"
},
)Response
Comment added successfully
Invalid request: invalid UUID format or missing todoComment field
Unauthorized - Invalid or missing authentication token
Insufficient permissions (processComponentsTodos) or access to project denied
Todo not found or todo does not belong to the component item in the project