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

# Import Batch Test Suite API

[Back to API List](https://koreai.mintlify.site/ai-for-service/apis/automation/api-list)

To import the test cases from a given Test Suite file.

| Field | Value |
| - | - |
| **Method** | POST |
| **Endpoint** | `https://{host}/api/public/bot/{botId}/testsuite/import` |
| **Content Type** | `application/json` |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](https://koreai.mintlify.site/ai-for-service/apis/automation/api-introduction.md#generating-the-jwt-token). |
| **API Scope** | App Builder: Batch Tests Management; Admin Console: Batch Tests Management |

## Query Parameters

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

## Sample Request

```json theme={null}
curl --location --request POST \
     'https://{host}/api/public/stream/{streamId}/testsuite/import' \
      --header 'auth: {YOUR_JWT_ACCESS_TOKEN}' \
      --header 'bot-language: {language-code}' \
      --header 'Content-Type: application/json' \
      --data-raw '{
         "delimiter": ",",
         "description": "fcgfddfg",
         "fileName": "5ff70b47a664d31999dxxxxx",
         "fileType": "json",
         "importType": "update",
         "name": "hgf",
         "engine": "dgpt"
        }'
```

> [!NOTE]
>
> * If `engine = "regression"` (or empty) or engine isn't provided, it will execute for ML Batch Testing.
> * If engine is set to `"dgpt"`, it will execute for Dialog GPT Batch Testing.

## Body Parameters

| Parameter | Description | Required |
| - | - | - |
| `fileName` | File containing the Batch Test suite details. | Required |
| `fileType` | JSON. | |
| `importType` | `new` or `update`. | |
| `delimiter` | Field delimiter in the file. | Required |
| `description` | Test suite description. | Required |

## Sample Response

```json theme={null}
{
    "_id": "ts-8304802f-6f85-5f67-8964-de04446xxxxx",
    "name": "hgf",
    "description": "fcgfddfg",
    "streamId": "st-15864388-c33d-5caf-86a6-d17951fxxxxx",
    "language": "en",
    "fileId": "5ff70b47a664d31999dxxxxx",
    "createdBy": "u-49bd0ecd-18d1-53e1-988d-84d3004xxxxx",
    "createdOn": "2021-01-05T17:43:43.927Z",
    "modifiedOn": "2021-01-07T13:48:14.169Z",
    "__v": 0,
    "fileName": "sampleBatchtesting (2) (copy) (1).json"
}
```


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