Import Bot as a New Bot API is used to create a new bot in the account owner’s Builder Tool using the File IDs generated by uploading the files to the local server. Refer to Upload File API on how to upload and obtain the File Id.
This API requires JWT generated by an application created only from Bot Admin Console.
To use this API, app needs the Admin API Scope of Bot Import under Bot Definition.
POST https://{{host}}/api/public/bot/import
Query Parameters
Parameter | Description |
---|---|
host | Environment URL, for example, https://bots.kore.ai |
Body Parameters
Parameter | Description |
---|---|
botDefinition | “Bot definition file id” Refer to Upload File API on how to upload and obtain the File Id. |
configInfo | “Bot configuration file id” Refer to Upload File API on how to upload and obtain the File Id. |
botFunctions (optional) | “ Bot fuctions File id” Refer to Upload File API on how to upload and obtain the File Id. |
icon | “Bot icon File id” Refer to Upload File API on how to upload and obtain the File Id. |
name (optional) | “Bot name” If not provided they will be taken from the existing bot copy |
purpose (optional) | “customer”/”employee” If not provided they will be taken from the existing bot copy |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response content type
application/json
Sample Request
curl -X POST \ https://{{host}}/api/public/bot/import \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json' \ -d '{ "botDefinition" : "5b7ed3c87cab5c48ea9794f9", "configInfo" : "5b7ed2w77cab5c48ea9794fa", "botFunctions":["5b7ed13a86a5fc48f4777ea6"], "icon":"5b7ed3837cab5c48ea9794fb" }'
Sample Response
{ "streamRefId": "f6e21f2d-cf90-52b0-bbc5-638add8dba26", "statusLogs": [ { "taskType": "importRequest", "taskName": "SampleTaskName", "status": "success" } ], "createdBy": "u-3ae8bd39-a65b-5b2c-b66b-85864a8202c3", "requestType": "Botimport", "_id": "bir-32a5ed0d-6181-5a0a-9f21-1bf872290029", "status": "pending", "createdOn": "2018-12-05T07:28:46.113Z", "__v": 0 }