Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Create a new question for a component item

Creates a new question for a component item within a project component. Questions capture customer-specific requirements or project details in a structured way, making work packages flexible and reusable.

What are Questions? Questions are form fields attached to component items (typically Work Packages) that help capture customer requirements or project details. They make work packages flexible and reusable by allowing later individualization in projects. When customers answer questions, the answers can automatically affect effort calculation and pricing.

Question Types: Each question can have one of eight types, each suited for different data collection needs:

  • ShortText: Single-line text input for names, titles, keywords, or short answers
  • Editor: Formatted multi-line text for descriptions, detailed explanations, or free text answers
  • Checkbox: Yes/No selection or multiple checkbox options. Answers can impact effort calculation if options have extraHours configured
  • Radio: Single choice from multiple predefined options. Answers can impact effort calculation if options have extraHours configured
  • Files: Upload files such as logos, documents, graphics, or reference materials
  • Datepicker: Select a date for deadlines, delivery dates, or scheduling
  • Multiplier: Dynamic calculation based on quantity. For example, “How many pages?” with a duration per page. The system calculates: Answer (quantity) × Duration per element = Total additional effort
  • Person: Select one or more people from the project team or clients

Key Features:

  • Automatic Effort Calculation: Answers to Checkbox, Radio, and Multiplier questions can automatically affect the project effort and pricing
  • Conditional Visibility: Questions can have conditions that control when they are shown (e.g., only show if another question was answered a certain way)
  • Flexible Options: Checkbox and Radio questions support multiple options, each with optional extraHours that affect effort calculation

Validation Rules: For Checkbox and Radio question types, at least one option must be provided in the options array. The description field accepts HTML or Markdown input and is automatically converted to IDoc format for storage.

Automatic Processing: After creating a question, the system automatically:

  • Assigns a sort order (max existing sort + 1) to position the question in the list
  • Recalculates all conditions to ensure dependent items are shown/hidden correctly
  • Updates timeframes if the question affects effort calculation
  • Triggers summary generation if needed

Use Case: Use questions to create dynamic, customer-specific project configurations. For example, ask “Do you need e-commerce functionality?” and automatically add extra work packages or adjust pricing based on the answer.

POST/projects/{projectId}/items/{itemId}/questions
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
Project UUID
itemIdstringrequired
Component item 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
conditionsCreateComponentItemConditionDto[]
Array of conditions that control question visibility/behavior
Show properties
Array of CreateComponentItemConditionDto
containsTypestring
Contains type for condition
Allowed:SomeAll
targetQuestionIdstring
Target question ID
targetTestCaseIdstring
Target test case ID
targetTodoIdstring
Target todo ID
targetValuestring
Target value to compare against
typestringrequired
Condition type determines what must be true for the condition to be met. Available types depend on the target element: QuestionAnswered, QuestionNotAnswered, QuestionAnswerContains, QuestionAnswerDoesNotContain, QuestionAnswerEqual, QuestionAnswerDoesNotEqual (for questions), TodoIsDone, TodoIsNotDone (for todos), TestCasePassed, TestCaseFailed (for test cases).
Allowed:QuestionAnsweredQuestionNotAnsweredQuestionAnswerContainsQuestionAnswerDoesNotContainQuestionAnswerEqualQuestionAnswerDoesNotEqualTodoIsDoneTodoIsNotDoneTestCasePassedTestCaseFailed
descriptionstringrequired
Question description (accepts HTML or Markdown, returns HTML)
multiplierValuenumber
Multiplier value (duration per element) for Multiplier question type. This represents the time needed for a single element (e.g., per page, per product, per user). When the question is answered with a quantity, the system calculates: Answer (quantity) × multiplierValue = Total additional effort in hours. For example, if multiplierValue is 2.5 and the answer is 10 pages, the total additional effort is 25 hours.
optionsCreateQuestionOptionDto[]
Array of answer options for Checkbox or Radio question types. Required for Checkbox/Radio types and must have at least 1 item. Each option can have an optional extraHours value that affects effort calculation when selected. For Checkbox questions, multiple options can be selected. For Radio questions, only one option can be selected.
Show properties
Array of CreateQuestionOptionDto
extraHoursnumber
Extra hours for this option
titlestringrequired
Option title
questionstringrequired
The question text
titlestringrequired
Question title/heading. Questions capture customer-specific requirements or project details. They make work packages flexible and reusable by allowing later individualization in projects.
typestringrequired
Question type determines what kind of answer is expected and how it is collected. Each type is suited for different data collection needs: - **ShortText**: Single-line text input for names, titles, keywords, or short answers - **Editor**: Formatted multi-line text for descriptions, detailed explanations, or free text answers - **Checkbox**: Yes/No selection or multiple checkbox options. Answers can automatically impact effort calculation and pricing if options have extraHours configured - **Radio**: Single choice from multiple predefined options. Answers can automatically impact effort calculation and pricing if options have extraHours configured - **Files**: Upload files such as logos, documents, graphics, or reference materials - **Datepicker**: Select a date for deadlines, delivery dates, or scheduling - **Multiplier**: Dynamic calculation based on quantity. The system calculates: Answer (quantity) × Duration per element = Total additional effort. Perfect for questions like "How many pages?" where effort scales with quantity - **Person**: Select one or more people from the project team or clients
Allowed:ShortTextEditorCheckboxRadioFilesDatepickerMultiplierPerson
Responses
201Question created successfully
idstring
ID of the created question
400Invalid request: options array must have at least 1 item for Checkbox/Radio types, 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, or item does not belong to a component in the project
Request
curl -X POST "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/questions" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "conditions": [
    {
      "containsType": "Some",
      "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,
      "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"
}