> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Import to an Existing Workflow API

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-process/apis/apis)</Badge>

This API enables users to import configurations, datasets, or updates into an existing workflow, allowing modifications without creating a new one. It ensures seamless integration by updating the workflow with the provided workflow data, flow data, and environment variables files.

After triggering the import, the response returns a `dockStatusId`. Use this ID to call the [Get Dock Status API](/ai-for-process/apis/apis-list/get-dock-status) and verify the status of the workflow import process.

|                   |                                                            |
| ----------------- | ---------------------------------------------------------- |
| **Method**        | POST                                                       |
| **Endpoint**      | `https://{host}/api/public/workflows/:{workflowId}/import` |
| **Content Type**  | application/json                                           |
| **Authorization** | **`X-api-key`** - The API key used for authentication.     |

**Where can I find the API key?**

To use the API, you will need an API key. [Learn more](/ai-for-process/workflows/triggers-and-access#create-an-api-key).

## Query Parameters

| PARAMETER      | DESCRIPTION                                                           | TYPE   | REQUIRED/OPTIONAL |
| -------------- | --------------------------------------------------------------------- | ------ | ----------------- |
| **host**       | The environment URL. For example, `https://ai-for-process.domain.ai/` | String | Required          |
| **workflowId** | The workflow ID of the workflow being imported.                       | String | Required          |

## Sample Request

```js theme={null}
curl --location 'https://{host}/api/public/workflows/a-fbxxxxxf4-20x5-58xb-8b94-00xxxxxxxx5/import' 
--header 'x-api-key: kg-90xxxxx5-9xxe-5xxf-9xx7-9f4xxxxxxxx4-55xxxxx4-axx9-4xx2-axx2-fbcxxxxxxxxa' 
--header 'Content-Type: application/json' 
--data '{
    "workflowDataFileId": "67xxxxxxxxxxxxxxxxxxxxxc",
    "flowDataFileId": "67xxxxxxxxxxxxxxxxxxxxxx2",
    "envVariablesFileId": "67xxxxxxxxxxxxxxxxxxxxx2"
}'
```

## Body Parameters

| PARAMETER              | DESCRIPTION                                               | TYPE   | REQUIRED/OPTIONAL |
| ---------------------- | --------------------------------------------------------- | ------ | ----------------- |
| **workflowDataFileId** | The identifier for the workflow data file being imported. | String | Required          |
| **flowDataFileId**     | The identifier for the flow data file.                    | String | Required          |
| **envVariablesFileId** | The identifier for the environment variables file.        | String | Required          |

## Sample Response

```js theme={null}
{
   "dockStatusId": "{dockStatusId}",
   "workflowId": "{workflowId}",
   "jobType": "WORKFLOWS",
   "action": "IMPORT",
   "status": "SUCCESS"
}
```

## Response Parameters

| PARAMETER        | DESCRIPTION                                                                            | TYPE   | SAMPLE VALUE                                  |
| ---------------- | -------------------------------------------------------------------------------------- | ------ | --------------------------------------------- |
| **dockStatusId** | The unique identifier to track the status of action. E.g. import, export, deploy, etc. | String | e.g., ds-c6xxxxx5-dxxd-5xxf-9xxd-0xxxxx6xxxx8 |
| **workflowId**   | The unique identifier for the workflow.                                                | String | e.g., a-8xxxxxbe-6xxe-5xx1-8xxc-bxxxxxx80xx6  |
| **jobType**      | The type of job being performed.                                                       | String | `WORKFLOWS`                                   |
| **action**       | The action being performed on the workflow/model.                                      | String | `IMPORT`                                      |
| **status**       | The current status of the job.                                                         | String | `IN_PROGRESS`, `SUCCESS`, or `FAILED`         |
