Partially update a component library item
Updates only the provided fields of an existing component library item (epic, work package, todo list, test suite). The description and internalNote fields accept HTML or Markdown and will be converted to the internal format. When the conditions array is provided, it completely replaces existing conditions. Conditions with id are updated, conditions without id are created, and conditions not in the array are deleted. Only library component items (component.projectId is null) can be updated through this endpoint.
PATCH
/administration/project-components/items/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredComponent item UUID
Query parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsoncomponentIdstringID of the component this item belongs to
conditionsSaveComponentItemConditionDto[]Array of conditions (full array replaces existing conditions)
Show propertiesHide properties
Array of
SaveComponentItemConditionDtocontainsTypestringrequiredContains type
Allowed:
SomeAllidstring | nullCondition ID (optional, for updates)
targetQuestionIdstring | nullTarget question ID (optional)
targetTestCaseIdstring | nullTarget test case ID (optional)
targetTodoIdstring | nullTarget todo ID (optional)
targetValuestring | nullTarget value (optional)
typestringrequiredCondition type
Allowed:
QuestionAnsweredQuestionNotAnsweredQuestionAnswerContainsQuestionAnswerDoesNotContainQuestionAnswerEqualQuestionAnswerDoesNotEqualTodoIsDoneTodoIsNotDoneTestCasePassedTestCaseFaileddescriptionstringDescription in HTML or Markdown format (will be converted to IDoc if provided)
iconobject | nullIcon identifier (can be set to null). Format: :icon_name: (e.g., :rocket:, :check:, :star:)
includeInSpecificationbooleanWhether to include in specification
internalNotestringInternal note in HTML or Markdown format (will be converted to IDoc if provided)
namestringName of the item
parentIdstringID of parent item for nested items
tagsstring[]Array of tag UUIDs
timeFramenumberTime frame in hours. Required for all types except Epic (when type is provided)
typestringType of item (Epic, WorkPackage, TodoList, TestSuite)
Allowed:
EpicWorkPackageTodoListTestSuiteResponses
200Item updated successfully
idstring<uuid>400Invalid request: invalid UUID format for item ID, component ID, tag IDs, or invalid type/timeFrame combination
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to edit component library
404Item not found, item does not belong to library component, or component not found
422Editor content conversion errors
Request
curl -X PATCH "https://leadtime.app/api/public/administration/project-components/items/3047983b-d798-4aff-8dd4-628cf1900703" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"componentId": "550e8400-e29b-41d4-a716-446655440000",
"conditions": [
{
"containsType": "Some",
"id": "550e8400-e29b-41d4-a716-446655440013",
"targetQuestionId": "550e8400-e29b-41d4-a716-446655440014",
"targetTestCaseId": "550e8400-e29b-41d4-a716-446655440016",
"targetTodoId": "550e8400-e29b-41d4-a716-446655440015",
"targetValue": "option-value",
"type": "QuestionAnswered"
}
],
"description": "<p>Implement user authentication and authorization</p>",
"icon": ":check:",
"includeInSpecification": true,
"internalNote": "<p>Implementation notes for the development team</p>",
"name": "User Authentication Feature",
"parentId": "550e8400-e29b-41d4-a716-446655440000",
"tags": [
"550e8400-e29b-41d4-a716-446655440000"
],
"timeFrame": 40,
"type": "WorkPackage"
}'const response = await fetch("https://leadtime.app/api/public/administration/project-components/items/3047983b-d798-4aff-8dd4-628cf1900703", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"componentId": "550e8400-e29b-41d4-a716-446655440000",
"conditions": [
{
"containsType": "Some",
"id": "550e8400-e29b-41d4-a716-446655440013",
"targetQuestionId": "550e8400-e29b-41d4-a716-446655440014",
"targetTestCaseId": "550e8400-e29b-41d4-a716-446655440016",
"targetTodoId": "550e8400-e29b-41d4-a716-446655440015",
"targetValue": "option-value",
"type": "QuestionAnswered"
}
],
"description": "<p>Implement user authentication and authorization</p>",
"icon": ":check:",
"includeInSpecification": true,
"internalNote": "<p>Implementation notes for the development team</p>",
"name": "User Authentication Feature",
"parentId": "550e8400-e29b-41d4-a716-446655440000",
"tags": [
"550e8400-e29b-41d4-a716-446655440000"
],
"timeFrame": 40,
"type": "WorkPackage"
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/administration/project-components/items/3047983b-d798-4aff-8dd4-628cf1900703",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"componentId": "550e8400-e29b-41d4-a716-446655440000",
"conditions": [
{
"containsType": "Some",
"id": "550e8400-e29b-41d4-a716-446655440013",
"targetQuestionId": "550e8400-e29b-41d4-a716-446655440014",
"targetTestCaseId": "550e8400-e29b-41d4-a716-446655440016",
"targetTodoId": "550e8400-e29b-41d4-a716-446655440015",
"targetValue": "option-value",
"type": "QuestionAnswered"
}
],
"description": "<p>Implement user authentication and authorization</p>",
"icon": ":check:",
"includeInSpecification": True,
"internalNote": "<p>Implementation notes for the development team</p>",
"name": "User Authentication Feature",
"parentId": "550e8400-e29b-41d4-a716-446655440000",
"tags": [
"550e8400-e29b-41d4-a716-446655440000"
],
"timeFrame": 40,
"type": "WorkPackage"
},
)Response
{
"id": "3047983b-d798-4aff-8dd4-628cf1900703"
}Invalid request: invalid UUID format for item ID, component ID, tag IDs, or invalid type/timeFrame combination
Unauthorized - Invalid or missing authentication token
Insufficient permissions to edit component library
Item not found, item does not belong to library component, or component not found
Editor content conversion errors