> ## 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.

# ML Utterances Import API

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

To import the ML Utterances into a bot.

| Field             | Value                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | POST                                                                                                                            |
| **Endpoint**      | `https://{{host}}/api/public/bot/{{BotID}}/mlimport`                                                                            |
| **Content Type**  | `application/json`                                                                                                              |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction#generating-the-jwt-token). |
| **API Scope**     | App Builder: Utterances Import; Admin Console: Test > Utterances Import and Train                                               |

## Query Parameters

| Parameter   | Description                                                                        | Required |
| ----------- | ---------------------------------------------------------------------------------- | -------- |
| **`host`**  | The environment URL. For example, `https://platform.kore.ai`                       | Required |
| **`BotId`** | Bot ID or Stream ID can be accessed under **General Settings** on the App Builder. | Required |

## Sample Request

```json theme={null}
curl -X POST 'https://{{host}}/api/public/bot/{{bot ID}}/mlimport' \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
  -H 'content-type: application/json' \
  -d '{
    "fileName":"MLUtterances.json",
    "fileId": "5beed4fd0b9a4b740c09dca2"
  }'
```

## Body Parameters

| Parameter      | Description                                                                             | Required |
| -------------- | --------------------------------------------------------------------------------------- | -------- |
| **`fileName`** | The full name of the ML Utterances file to be imported.                                 | Required |
| **`fileID`**   | The ID of the imported file (provided by the cloud service where the file is uploaded). | Required |

## Sample Response

```json theme={null}
{
    "status": "pending",
    "streamId": "sx-6exxxxxx-5xx1-5xx0-b9xx-8cxxxxxxxxxx",
    "createdBy": "u-5dxxxxxxxxxxx-5xx0-a3xx-2exxxxxxxxxx",
    "requestType": "MLimport",
    "_id": "bxx-7exxxxxx-5xxb-51xx-bxx5-88xxxxxxxxxx",
    "statusLogs": [],
    "createdOn": "2019-06-27T12:03:30.748Z",
    "__v": 0
}
```
