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

# Deploy a Workflow API

[Back to API List](https://koreai.mintlify.site/ai-for-process/apis/apis.md)

This API deploys a specific workflow into an environment. It allows the user to control the deployment process either synchronously or asynchronously, depending on the value of the `isAsync` parameter.

The API response includes the **workflow ID** and the **workflow deployment status**. After receiving the response, use the `dockStatusId` to call the [Get Dock Status API](https://koreai.mintlify.site/ai-for-process/apis/apis-list/get-dock-status) and verify the workflow deployment status.

| | |
| - | - |
| **Method** | POST |
| **Endpoint** | `https://{host}/api/public/workflows/:{workflowId}/deploy` |
| **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](https://koreai.mintlify.site/ai-for-process/workflows/triggers-and-access.md#create-an-api-key).

## Path Parameters

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

## Sample Request

```js theme={null}
curl --location 'https://{host}/api/public/workflows/a-0xxxxxxxxxxxxxxxxxxe/deploy' 
--header 'x-api-key: kg-axxxxxxx-5xx3-5xx8-bxxb-9xxxxxxxxxxxb-9xx5-cxxxxxxxxx3' 
--header 'Content-Type: application/json' 
--data '{
  "isAsync": false
}'
```

## Body Parameters

| PARAMETER | DESCRIPTION | TYPE | REQUIRED/OPTIONAL |
| - | - | - | - |
| **isAsync** | Indicates if the deployment is asynchronous (`true`) or synchronous (`false`). | Boolean | Required |

## Sample Response

```js theme={null}
{
   "dock-statusId": "ds-cxxxxxx8-exx2-5xx7-9xx6-30xxxxxxxxxe",
   "workflowId": "a-49xxxxx9-fxx9-5xx7-axx7-9xxxxxxxxxxb",
   "jobType": "WORKFLOWS",
   "action": "DEPLOY",
   "status": "SUCCESS"
}
```

## Response Parameters

| PARAMETER | DESCRIPTION | TYPE |
| - | - | - |
| **dockStatusId** | The unique identifier for tracking the workflow deployment. | String |
| **workflowId** | The unique identifier of the workflow being deployed. | String |
| **jobType** | The type of job being performed (`WORKFLOWS`). | String |
| **action** | The action being performed (`DEPLOY`). | String |
| **status** | The deployment status (`SUCCESS`, `IN_PROGRESS`, or `FAILED`). | String |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.