Skip to main content
Back to API List To create a new bot in the account owner’s Builder Tool using the File IDs generated when uploading the files to the local server. You can import a bot using either individual Definition, Config, Functions and Icon files, or you can directly use the zip file that’s created while performing bot export. In this case you need to upload the zip file and use the File ID thus generated. Refer to Upload File API for uploading and obtaining the File ID.
This API requires the JWT generated by an application created only from the Admin Console.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/public/bot/import
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Not Applicable; Admin Console: Bot Definition > Bot Import

Query Parameters

ParameterDescriptionRequired
hostThe environment URL. For example, https://platform.kore.aiRequired

Sample Request

Case 1: JSON
curl -X POST \
  https://{{host}}/api/public/bot/import \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
   -H 'content-type: application/json' \
   -d '{
  "botDefinition" : "5bxxxxxxxxxxx4f9",
  "configInfo" : "5bxxxxxxxxxxxxx4fa",
  "botFunctions":["5bxxxxxxxxxxxxxea6"],
  "icon":"5bxxxxxxxxxxxxxxxx4fb",
  "name":"gallahad4",
  "uploadMode":"JSON"
}'
Case 2: ZIP file
curl -X POST \
  https://{{host}}/api/public/bot/import \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
   -H 'content-type: application/json' \
   -d '{
  "zipInfo" : "661e717xxxx890b3844xxxxx",
  "name":"volkihar",
  "uploadMode":"ZIP"
}'

Body Parameters

ParameterDescriptionRequired
uploadModeMode of Upload (JSON or ZIP).Required
botDefinitionBot definition file ID.Required (if uploadMode is JSON)
configInfoBot configuration file ID.Required (if uploadMode is JSON)
botFunctionsBot functions file ID.Optional (if uploadMode is JSON)
iconBot icon file ID.Required (if uploadMode is JSON)
zipInfoZip file ID.Required (if uploadMode is ZIP)
nameBot name. If not provided, it’s fetched from the existing bot’s copy.Optional
purposecustomer or employee. If not provided, it’s fetched from the existing bot’s copy.Optional

Sample Response

{
    "_id": "bir-034fc180-4f84-xxxx-xxxx-5d85b76a36dc",
    "streamRefId": "46d82741-1edc-xxxx-xxxx-7e58ead9deed",
    "status": "pending",
    "statusLogs": [
        {
            "taskType": "importRequest",
            "taskName": "volkihar",
            "status": "success"
        }
    ],
    "requestType": "Botimport",
    "createdBy": "u-ed453f8f-131a-xxxx-xxxx-03405203199d",
    "createdOn": "2024-04-29T11:09:25.312Z",
    "__v": 0
}