Partially update an existing question
Updates only the provided fields of an existing question for a component item within a project. Questions support multiple types (ShortText, Editor, Checkbox, Radio, Files, Datepicker, Multiplier, Person). For Checkbox/Radio types, options must be provided if type is being updated to one of these types. The description field accepts HTML or Markdown input and is stored in IDoc format. Options management: options with id are updated, options without id are created, options removed from array are deleted. Conditions management: conditions with id are updated, conditions without id are created, conditions removed from array are deleted. This endpoint automatically recalculates conditions, updates timeframes, and triggers summary generation.
PATCH
/projects/{projectId}/items/{itemId}/questions/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredProject UUID
itemIdstringrequiredComponent item UUID
idstringrequiredQuestion 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/jsonconditionsUpdateComponentItemConditionDto[]Array of conditions that control question visibility/behavior (creates/updates/deletes based on presence of id)
Show propertiesHide properties
Array of
UpdateComponentItemConditionDtocontainsTypestringContains type for condition
Allowed:
SomeAllidstringCondition ID - if provided, updates existing condition; if omitted, creates new condition
targetQuestionIdstringTarget question ID
targetTestCaseIdstringTarget test case ID
targetTodoIdstringTarget todo ID
targetValuestringTarget value to compare against
typestringrequiredCondition type
Allowed:
QuestionAnsweredQuestionNotAnsweredQuestionAnswerContainsQuestionAnswerDoesNotContainQuestionAnswerEqualQuestionAnswerDoesNotEqualTodoIsDoneTodoIsNotDoneTestCasePassedTestCaseFaileddescriptionstringQuestion description (accepts HTML or Markdown, returns HTML)
multiplierValuenumberMultiplier value for calculations
optionsUpdateQuestionOptionDto[]Array of answer options (creates/updates/deletes based on presence of id). Required if type is updated to Checkbox/Radio.
Show propertiesHide properties
Array of
UpdateQuestionOptionDtoextraHoursnumberExtra hours for this option
idstringOption ID - if provided, updates existing option; if omitted, creates new option
titlestringrequiredOption title
questionstringThe question text
titlestringQuestion title/heading
typestringQuestion type
Allowed:
ShortTextEditorCheckboxRadioFilesDatepickerMultiplierPersonResponses
200Question updated successfully
idstringID of the updated question
400Invalid request: options array must have at least 1 item for Checkbox/Radio types when type is updated, or invalid UUID/description format
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to manage components or access to project denied
404Project not found, item not found, question not found, or question does not belong to an item in the project
422Editor content conversion errors
Request
curl -X PATCH "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/questions/f47dc37b-7693-4d06-b49c-17084b773baa" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"conditions": [
{
"containsType": "Some",
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetQuestionId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetTestCaseId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetTodoId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetValue": "Yes",
"type": "QuestionAnswered"
}
],
"description": "<p>This question helps us understand performance requirements.</p>",
"multiplierValue": 1.5,
"options": [
{
"extraHours": 2.5,
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"title": "Option A"
}
],
"question": "Please specify the expected response time",
"title": "What is the expected performance?",
"type": "ShortText"
}'const response = await fetch("https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/questions/f47dc37b-7693-4d06-b49c-17084b773baa", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"conditions": [
{
"containsType": "Some",
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetQuestionId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetTestCaseId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetTodoId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetValue": "Yes",
"type": "QuestionAnswered"
}
],
"description": "<p>This question helps us understand performance requirements.</p>",
"multiplierValue": 1.5,
"options": [
{
"extraHours": 2.5,
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"title": "Option A"
}
],
"question": "Please specify the expected response time",
"title": "What is the expected performance?",
"type": "ShortText"
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/questions/f47dc37b-7693-4d06-b49c-17084b773baa",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"conditions": [
{
"containsType": "Some",
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetQuestionId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetTestCaseId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetTodoId": "e57dc37b-7693-4d06-b49c-17084b773aff",
"targetValue": "Yes",
"type": "QuestionAnswered"
}
],
"description": "<p>This question helps us understand performance requirements.</p>",
"multiplierValue": 1.5,
"options": [
{
"extraHours": 2.5,
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"title": "Option A"
}
],
"question": "Please specify the expected response time",
"title": "What is the expected performance?",
"type": "ShortText"
},
)Response
{
"id": "f47dc37b-7693-4d06-b49c-17084b773baa"
}Invalid request: options array must have at least 1 item for Checkbox/Radio types when type is updated, or invalid UUID/description format
Unauthorized - Invalid or missing authentication token
Insufficient permissions to manage components or access to project denied
Project not found, item not found, question not found, or question does not belong to an item in the project
Editor content conversion errors