Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Create a new component item (Epic, Work Package, Todo List, or Test Suite)

Creates a new component item within a project component. Items are the building blocks that structure project work.

What are Component Items? Items are the building blocks within components that organize and structure project work. Each item can be one of four types:

  1. Epic: Major sections or phases that group related work packages around a common theme or goal

    • Example: “Technical Implementation”, “Design & Development”, “Project Kickoff & Preparation”
    • Can contain Work Packages, Todo Lists, or Test Suites
    • Can nest other Epics to create complex hierarchies (arbitrary nesting depth)
    • Helps track project progress at a strategic level
    • TimeFrame is not required for Epics
  2. Work Package: Self-contained, clearly defined tasks that deliver tangible results

    • Example: “Set up domain and hosting”, “Design homepage layout”, “Configure CMS”
    • Can have timeframes/estimates (required field)
    • Can contain Questions (to capture customer requirements), Todos (checklist items), and Test Cases (acceptance test steps)
    • Can nest other Work Packages for complex tasks
    • Acts as a draft before creating tickets in the task management system
  3. Todo List: Checklists of sub-steps or checkpoints

    • Example: “Kickoff Checklist”, “Quality Control Checklist”, “Go-live Approval”
    • Perfect for recurring processes (tests, approvals, installation steps)
    • Each todo item within the list can be checked off individually
    • TimeFrame is required (estimated time to complete the checklist)
  4. Test Suite: Formal acceptance tests for project results

    • Example: “Contact Form Tests”, “Responsive Design Check”, “SEO Review”
    • Contains multiple test cases with steps and expected results
    • Project is considered finished when all test cases within all Test Suites pass
    • TimeFrame is required (estimated time to run all tests)

Item Placement: Items can be created at the root level of a component or nested under parent items (Epics or other Work Packages). This allows for flexible project structures that match your workflow.

Content Format: The description and internalNote fields accept HTML or Markdown input and are automatically converted to the internal IDoc format for storage. When retrieved, they are converted back to HTML for easy consumption.

Validation Rules: TimeFrame is required for all item types except Epic. The timeframe represents the estimated effort in hours for completing the item.

POST/projects/{projectId}/items
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
Project 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
componentIdstringrequired
ID of the component this item belongs to
conditionsCreateComponentItemConditionDto[]
Array of conditions that control when this item is visible or active. Conditions link items to questions, todos, or test cases. An item is only shown when all its conditions are met. For example, a work package can be hidden until a specific question is answered a certain way, or a todo list can appear only after a test case passes. Conditions enable dynamic, context-dependent project structures that adapt based on customer answers and project progress.
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
Description in HTML or Markdown format (will be converted to IDoc)
iconobject | null
Icon identifier
includeInSpecificationbooleanrequired
Whether to include in specification
internalNotestring
Internal note in HTML or Markdown format (will be converted to IDoc)
namestringrequired
Name of the item
parentIdstring | null
ID of parent item for nested items
tagsstring[]
Array of tag UUIDs
timeFramenumber
Time frame in hours representing the estimated effort for completing this item. Required for all item types except Epic. For Work Packages, this represents the estimated time to complete the task. For Todo Lists, this is the estimated time to complete the entire checklist. For Test Suites, this is the estimated time to run all test cases.
typestringrequired
Type of component item. Items are the building blocks within components that structure project work: - **Epic**: Major sections or phases that group related work packages around a common theme (e.g., "Technical Implementation", "Design & Development"). Epics help track project progress at a strategic level and can nest other items. - **WorkPackage**: Self-contained, clearly defined tasks that deliver tangible results (e.g., "Set up hosting", "Design homepage layout"). Work packages can have timeframes, questions, todos, and test cases attached. - **TodoList**: Checklists of sub-steps or checkpoints perfect for recurring processes, quality control, or project preparation (e.g., "Kickoff Checklist", "Quality Control"). Each todo item can be checked off individually. - **TestSuite**: Formal acceptance tests for project results (e.g., "Contact Form Tests", "SEO Review"). Contains multiple test cases with steps and expected results. The project is considered finished when all test cases pass.
Allowed:EpicWorkPackageTodoListTestSuite
Responses
201Component item created successfully
idstringrequired
ID of the created component item
400Invalid request: invalid UUID format, missing required fields, or validation errors
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to manage components or access to project denied
404Component not found or does not belong to the specified project
422Editor content conversion errors
Request
curl -X POST "https://leadtime.app/api/public/projects/550e8400-e29b-41d4-a716-446655440000/items" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "componentId": "550e8400-e29b-41d4-a716-446655440000",
  "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>Implement user authentication with OAuth 2.0</p>",
  "icon": "faCheckSquare",
  "includeInSpecification": true,
  "internalNote": "<p>Technical implementation details</p>",
  "name": "User Authentication Feature",
  "parentId": "a47dc37b-7693-4d06-b49c-17084b773aff",
  "tags": [
    "550e8400-e29b-41d4-a716-446655440020"
  ],
  "timeFrame": 20,
  "type": "WorkPackage"
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440001"
}