Create or update a question for a library component item
Creates a new question for a component library item or updates an existing question if id is provided in the request body.
What are Questions? Questions capture customer-specific requirements or project details in a structured way. They make work packages flexible and reusable by allowing later individualization in projects.
Question Types:
- ShortText: Single-line text input (name, title, keyword)
- Editor: Formatted multi-line text (descriptions, free text)
- Checkbox: Yes/No selection (can impact effort calculation)
- Radio: Single choice from multiple options (can impact effort)
- Files: Upload files (logos, documents, graphics)
- Datepicker: Select a date (deadlines, delivery dates)
- Multiplier: Dynamic calculation based on quantity (e.g., “How many pages?” × duration per page = total effort)
- Person: Select person(s) from project team or clients
Key Features:
- Answers can automatically affect effort calculation
- Questions can have conditions (shown only if other questions answered a certain way)
- Multiplier questions calculate: Answer × Duration per element = Total additional effort
- In library components, questions are defined but not answered
For Checkbox/Radio types, at least one option must be provided. Description field accepts HTML or Markdown input and returns HTML format. Only library component items (component.projectId is null) are accessible through this endpoint.
POST
/administration/project-components/item-details/{itemId}/questionsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
itemIdstringrequiredComponent item UUID. Items are the building blocks within components (Epics, Work Packages, Todo Lists, Test Suites).
Request body
requiredapplication/jsonconditionsQuestionConditionDto[]Question conditions that control visibility/behavior. Conditions can show/hide questions based on answers to other questions, todo completion, or test case status.
Show propertiesHide properties
Array of
QuestionConditionDtocontainsTypestringContains type
Allowed:
SomeAllidstringCondition ID (for updates)
targetQuestionIdstringTarget question ID
targetTestCaseIdstringTarget test case ID
targetTodoIdstringTarget todo ID
targetValuestringTarget value
typestringrequiredCondition type. Conditions control when items or questions are visible/active:
- **QuestionAnswered/QuestionNotAnswered**: Based on whether a question is answered
- **QuestionAnswerEqual/QuestionAnswerDoesNotEqual**: Based on specific answer value
- **QuestionAnswerContains/QuestionAnswerDoesNotContain**: Based on answer containing values
- **TodoIsDone/TodoIsNotDone**: Based on todo completion status
- **TestCasePassed/TestCaseFailed**: Based on test case evaluation
Allowed:
QuestionAnsweredQuestionNotAnsweredQuestionAnswerContainsQuestionAnswerDoesNotContainQuestionAnswerEqualQuestionAnswerDoesNotEqualTodoIsDoneTodoIsNotDoneTestCasePassedTestCaseFaileddescriptionstringQuestion description (accepts HTML or Markdown, returns HTML)
idstringQuestion ID (for updates - if provided, updates existing question)
multiplierValuenumberMultiplier value (for Multiplier type). This is the duration per element (e.g., hours per page). When answered, the system calculates: Answer × multiplierValue = Total additional effort.
optionsQuestionOptionDto[]Question options (required for Checkbox/Radio types, must have at least one option). Each option can have an extraHours value that affects effort calculation when selected.
Show propertiesHide properties
Array of
QuestionOptionDtoextraHoursnumberExtra hours for this option. When this option is selected (for Checkbox/Radio questions), this value is added to the effort calculation.
idstringOption ID (for updates)
titlestringrequiredOption title. For Checkbox questions, users can select multiple options. For Radio questions, users can select only one option.
questionstringrequiredThe question text that will be displayed to users. This is the actual question being asked (e.g., "Please specify the expected response time").
titlestringrequiredQuestion title/heading. Questions capture customer-specific requirements or project details. They make work packages flexible and reusable by allowing later individualization in projects.
typestringrequiredQuestion type. Questions can be:
- **ShortText**: Single-line text input
- **Editor**: Formatted multi-line text
- **Checkbox**: Yes/No selection (can impact effort)
- **Radio**: Single choice from options (can impact effort)
- **Files**: Upload files
- **Datepicker**: Select a date
- **Multiplier**: Dynamic calculation (quantity × duration per element)
- **Person**: Select person(s) from team
Allowed:
ShortTextEditorCheckboxRadioFilesDatepickerMultiplierPersonResponses
200Question created or updated successfully
idstringsuccessboolean401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/administration/project-components/item-details/3047983b-d798-4aff-8dd4-628cf1900703/questions" \
-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>",
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"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/administration/project-components/item-details/3047983b-d798-4aff-8dd4-628cf1900703/questions", {
method: "POST",
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>",
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"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.post(
"https://leadtime.app/api/public/administration/project-components/item-details/3047983b-d798-4aff-8dd4-628cf1900703/questions",
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>",
"id": "e57dc37b-7693-4d06-b49c-17084b773aff",
"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": "e57dc37b-7693-4d06-b49c-17084b773aff",
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions