Skip to content

Bot Export API

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}}

See How to generate the JWT Token.

API Scope
  • Bot Builder: Bot Export
  • Admin Console: Bot Definition > Bot Export

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",
            "genAIandLLMSettings"
        ],
        "tasks": [
            "botTask",
            "knowledgeGraph",
            "smallTalk"
        ],
        "nlpData": [
            "utterances",
            "patterns",
            "traits",
            "rules",
            "concepts",
            "synonyms",
            "standardResponses",
            "nlpSettings"
        ],
        "AgentAI": [
            "rules",
            "playbooks",
            "widgetSettings",
            "layoutSettings"
        ]
    },
    "subTasks": {
        "alerts": [],
        "actions": [],
        "dialogs": []
    },
    "allTasks": true,
    "customDashboards": true,
    "IncludeDependentTasks": true
}'

Body Parameters

PARAMETER DESCRIPTION MANDATE
exportType Bot type –
  • latest‘ or
  • published
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"

],

"AgentAI": [

"rules",

"playbooks",

"widgetSettings",

"layoutSettings"

],

"settings": [

"botSettings",

"botVariables",

"ivrSettings"

"genAIandLLMSettings"

]

},

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

{
    "_id": "ber-a59b2599-9209-57f8-a3ad-3109e08e427a",
    "streamId": "st-6fa10d24-9091-5c38-b457-1e33a82b115e",
    "status": "pending",
    "createdBy": "u-ccdc35ab-3541-5642-bd74-df7ae1afcfe6",
    "exportType": "latest",
    "requestType": "Botexport",
    "createdOn": "2024-09-30T08:12:03.442Z",
    "__v": 0
}