Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

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 · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
Project UUID
itemIdstringrequired
Component item UUID
idstringrequired
Question UUID
Query parameters
fieldsToReturnstring
Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestring
Advanced 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:compactfull
Header parameters
LT-Response-Shapestring
Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:full
Request body
requiredapplication/json
conditionsUpdateComponentItemConditionDto[]
Array of conditions that control question visibility/behavior (creates/updates/deletes based on presence of id)
Show properties
Array of UpdateComponentItemConditionDto
containsTypestring
Contains type for condition
Allowed:SomeAll
idstring
Condition ID - if provided, updates existing condition; if omitted, creates new condition
targetQuestionIdstring
Target question ID
targetTestCaseIdstring
Target test case ID
targetTodoIdstring
Target todo ID
targetValuestring
Target value to compare against
typestringrequired
Condition type
Allowed:QuestionAnsweredQuestionNotAnsweredQuestionAnswerContainsQuestionAnswerDoesNotContainQuestionAnswerEqualQuestionAnswerDoesNotEqualTodoIsDoneTodoIsNotDoneTestCasePassedTestCaseFailed
descriptionstring
Question description (accepts HTML or Markdown, returns HTML)
multiplierValuenumber
Multiplier 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 properties
Array of UpdateQuestionOptionDto
extraHoursnumber
Extra hours for this option
idstring
Option ID - if provided, updates existing option; if omitted, creates new option
titlestringrequired
Option title
questionstring
The question text
titlestring
Question title/heading
typestring
Question type
Allowed:ShortTextEditorCheckboxRadioFilesDatepickerMultiplierPerson
Responses
200Question updated successfully
idstring
ID 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"
}'
Response
{
  "id": "f47dc37b-7693-4d06-b49c-17084b773baa"
}