To export the bot definition and all the associated components.
Note: This API only initiates the export process. Please use the Export Status API to view the export progress status and obtain a link to download the file once the export completes.
| Method | POST | 
| Endpoint | https://{{host}}/api/public/bot/{{BotID}}/export | 
| Content Type | application/json | 
| Authorization | auth: {{JWT}} | 
| API Scope | 
 | 
Query Parameters
| Parameter | Description | Mandate | 
|---|---|---|
| host | The environment URL. For example, https://bots.kore.ai | Required | 
| BotID | Bot ID or Stream ID can be accessed under General Settings on the Bot Builder. | Required | 
Sample Request
curl --location 'https://{host}/api/public/bot/{BotID}/export' \ --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ Â Â Â "exportType": "published", Â Â Â "exportOptions": { Â Â Â Â Â Â Â "settings": [ Â Â Â Â Â Â Â Â Â Â Â "botSettings", Â Â Â Â Â Â Â Â Â Â Â "botVariables", Â Â Â Â Â Â Â Â Â Â Â "ivrSettings" Â Â Â Â Â Â Â ], Â Â Â Â Â Â Â "tasks": [ Â Â Â Â Â Â Â Â Â Â Â "botTask", Â Â Â Â Â Â Â Â Â Â Â "knowledgeGraph", Â Â Â Â Â Â Â Â Â Â Â "smallTalk" Â Â Â Â Â Â Â ], Â Â Â Â Â Â Â "nlpData": [ Â Â Â Â Â Â Â Â Â Â Â "utterances", Â Â Â Â Â Â Â Â Â Â Â "patterns", Â Â Â Â Â Â Â Â Â Â Â "traits", Â Â Â Â Â Â Â Â Â Â Â "rules", Â "concepts", Â Â Â Â Â Â Â Â Â Â Â "synonyms", Â Â Â Â Â Â Â Â Â Â Â "standardResponses", Â "nlpSettings" Â Â Â Â Â Â Â ] Â Â Â }, Â Â Â "subTasks": { Â Â Â Â Â Â Â "alerts": [], Â Â Â Â Â Â Â "actions": [], Â Â Â Â Â Â Â "dialogs": [] Â Â Â }, Â Â Â "allTasks": true, Â Â Â "customDashboards": true, Â Â Â "IncludeDependentTasks": true }'
Body Parameters
| Parameter | Description | Mandate | 
|---|---|---|
| exportType | Bot type – 
 | Required | 
| exportOptions | All the bot components are exported by default. If required, you may specify the components to be included for the export. Usage: "exportOptions": {
      "tasks": [
             "botTask",
             "knowledgeGraph"
           ],
      "nlpData": [
             "nlpSettings",
             "utterances",
             "standardResponses"
           ],
      "settings": [
             "botSettings",
             "botVariables",
             "ivrSettings"
           ]
   }, | Optional | 
| subTasks | For partial export mention the tasks to be exported. Usage:     "subTasks": {
        "dialogs": ["<dialog Name 1>","<dialog Name 2>"],
        "alerts": ["<alert name 1>","<alert name 2>"],
        "actions": ["<action name 1>","<action name 2>"]
    }
 | Optional | 
| IncludeDependentTasks | To include dependent tasks for export. Usage: "IncludeDependentTasks": true | Optional | 
| customDashboards | To include custom dashboards for export. Usage: "customDashboards": true | Optional | 
| allTasks | To include all tasks for export, will be ignored if subTasks is present. Usage: "allTasks": true | Optional | 
To learn more about the optional parameters for partial import and dependent tasks, please click here.
Sample Response
{
    "status": "pending",
    "streamId": "st-57af1576-bbdc-5ded-a608-5cfbc00c6415",
    "createdBy": "u-f8708c55-de2c-5690-8821-ac90624779b5",
    "exportType": "published",
    "requestType": "Botexport",
    "_id": "ber-dd746d3c-1631-53af-81ca-03a1d01f0487",
    "createdOn": "2023-03-31T13:06:16.309Z",
    "__v": 0
}