---
search:
  tags:
    - projects
    - POST
seo:
  description: >-
    Imports one or more reusable component… Reference for the POST
    /projects/{projectId}/components/import-from-library endpoint in the
    Leadtime Public API API.
sidebar:
  badge: POST
  label: Import components from library into project
title: Import components from library into project
type: openapi-operation
---
Imports one or more reusable component templates from the workspace component library into the specified project.

**Component Library vs Project Components:**
The component system operates in two contexts:
- **Library Components**: Workspace-wide reusable templates (projectId is null). These are blueprints with no live data - questions are defined but not answered, todos are not checked, test cases are not evaluated. Library components serve as templates that can be reused across multiple projects.
- **Project Components**: Live instances in projects (projectId is set). These contain actual project data - questions can be answered, todos can be checked off, test cases can be evaluated, and items can be connected to tasks in the task management system.

**What Gets Imported:**
When you import a library component, the complete component structure is duplicated into the project, including:
- All items (Epics, Work Packages, Todo Lists, Test Suites) with their complete hierarchy and nesting
- All questions with their options and configurations (answers are initialized as empty/unanswered)
- All todos with their descriptions (completion status is initialized as not done)
- All test cases with steps and expected results (evaluations are initialized as not tested)
- All conditions with their logic (automatically updated to reference the new item/question/todo/test case IDs in the project)

**Automatic Processing:**
After import, the system automatically:
- Recalculates all conditions to ensure they reference the correct items in the project
- Recalculates timeframes based on work packages and their configurations
- Adds the imported components to the end of the project component list
- Marks the project configuration as changed

**Use Case:**
This endpoint is perfect for standardizing project setup. Create reusable templates in the library once, then import them into new projects to get a consistent starting structure that can be customized per project.

<Operation source="api-reference" id="projectcomponentscontroller-importfromlibrary" />
