1. Home
  2. Kore.ai Conversational Platform
  3. Using Kore.ai APIs
  4. Publish Bot API

Publish Bot API

Used to initiate a publish request for a bot. Before calling the Publish Bot API, make sure that at least one channel is enabled for the bot.

POST https://{{host}}}}/api/public/bot/{{bot_id}}/publish

Query Parameters

 

Parameter Description
host Environment URL, for example, https://bots.kore.ai
bot_id Bot ID or Stream ID. You can access it from the General Settings page of the bot.

Body Parameters

Parameter Description
versionComment Comments for your Publish request

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 \
  http://{{host}}/api/public/bot/{{bot_id}}/publish \
  -H 'auth: YOUR_JWT_ACCESS_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
	"versionComment" : "new update"
}'

Sample Response

c[
    {
        "resourceType": "dialog",
        "resourceId": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
        "sbResourceId": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
        "status": "SUCCESS",
        "result": {
            "visibility": {
                "namespace": "enterprise",
                "namespaceIds": [
                    "o-23b63f37-89e7-52e9-bc5d-8012cbda0d4a"
                ]
            },
            "contextLifeTime": {
                "options": "close"
            },
            "version": "1.0",
            "nodes": [
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false
                    },
                    "nodeId": "intent0",
                    "type": "intent",
                    "transitions": [
                        {
                            "default": "entity1",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy0"
                            }
                        }
                    ],
                    "metadata": {
                        "left": 19,
                        "top": 142
                    },
                    "componentId": "dc-4935f617-c82d-5c39-96d6-4df11f48bd99"
                },
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false,
                        "precedence": "entityOverIntent"
                    },
                    "nodeId": "entity1",
                    "type": "entity",
                    "transitions": [
                        {
                            "metadata": {
                                "connId": "dummy1",
                                "color": "#299d8e"
                            },
                            "default": "entity2"
                        }
                    ],
                    "metadata": {
                        "left": 9,
                        "top": 312
                    },
                    "componentId": "dc-a62d7d10-3ed2-5fb8-afc1-1d75b12e0253"
                },
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false,
                        "precedence": "entityOverIntent"
                    },
                    "nodeId": "entity2",
                    "type": "entity",
                    "transitions": [
                        {
                            "metadata": {
                                "connId": "dummy6",
                                "color": "#299d8e"
                            },
                            "then": "message3",
                            "if": {
                                "value": "15",
                                "op": "eq",
                                "field": "entity2"
                            }
                        },
                        {
                            "metadata": {
                                "connId": "dummy7",
                                "color": "#5ea8d3"
                            },
                            "then": "message4",
                            "if": {
                                "value": "30",
                                "op": "eq",
                                "field": "entity2"
                            }
                        },
                        {
                            "default": "end",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy3"
                            }
                        }
                    ],
                    "metadata": {
                        "left": 24,
                        "top": 467
                    },
                    "componentId": "dc-64fc56de-b475-5071-b839-7615d600bf9b"
                },
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false
                    },
                    "nodeId": "message3",
                    "type": "message",
                    "transitions": [
                        {
                            "default": "end",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy5"
                            }
                        }
                    ],
                    "metadata": {
                        "left": 318,
                        "top": 373
                    },
                    "componentId": "dc-fb7bb786-8bd8-5f40-a2f9-92642c43ae5c"
                },
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false
                    },
                    "nodeId": "message4",
                    "type": "message",
                    "transitions": [
                        {
                            "default": "end",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy7"
                            }
                        }
                    ],
                    "metadata": {
                        "top": 627,
                        "left": 278
                    },
                    "componentId": "dc-32f800ce-f457-545c-846f-8e0b64c6c58c"
                }
            ],
            "isPublishedVersion": false,
            "idp": "none",
            "state": "awaitingApproval",
            "languages": [],
            "compatibility": [],
            "adminTaskStatus": "active",
            "editable": true,
            "isHidden": false,
            "approvedLanguages": [],
            "approvalRequestedLanguages": [
                "en"
            ],
            "localeData": {
                "en": {
                    "name": "mortgage",
                    "shortDesc": ""
                }
            },
            "isFollowUp": false,
            "interruptOptions": {
                "type": {
                    "option": "developer",
                    "message": ""
                },
                "priority": "task",
                "interruptsEnabled": true,
                "holdUxOptions": {
                    "option": "discardCurrTaskNoNotify",
                    "message": ""
                }
            },
            "_id": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
            "refId": "682f9675-07a2-5505-aa75-52fd2c4d1a17",
            "followUpIntents": [
                {
                    "refId": "19ad68d9-beb9-5670-ba73-47cf4e8cb1e7",
                    "transitions": [],
                    "interruptOptions": {
                        "type": {
                            "option": "developer",
                            "message": ""
                        },
                        "interruptsEnabled": true,
                        "holdUxOptions": {
                            "option": "discardCurrTask",
                            "message": [
                                "Discarded current task to switch to new task"
                            ]
                        },
                        "parameterMap": {
                            "preAssignments": [
                                {
                                    "Place": "",
                                    "preDefined": true,
                                    "entityId": "dc-325a8628-ef8b-5411-853b-f6b51e6f43aa"
                                },
                                {
                                    "Day": "",
                                    "preDefined": true,
                                    "entityId": "dc-33d98b9a-f332-505b-b370-c63b7d22edc9"
                                },
                                {
                                    "Time": "",
                                    "preDefined": true,
                                    "entityId": "dc-d24a083d-e8e0-51c0-ba25-216ba5439ee2"
                                }
                            ],
                            "postAssignments": [
                                {
                                    "mortType": "",
                                    "preDefined": true,
                                    "entityId": "dc-29155c38-86f4-5124-b704-e932f55b0623"
                                },
                                {
                                    "frType": "",
                                    "preDefined": true,
                                    "entityId": "dc-7af53bfd-eff5-5e0d-84c5-24d22d8fa150"
                                }
                            ]
                        }
                    }
                }
            ],
            "streamId": "st-b4543a96-49ec-5d95-a120-c6244fc23777",
            "createdBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
            "createdOn": "2018-12-05T07:45:19.391Z",
            "lModBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
            "lMod": "2018-12-05T07:53:13.000Z",
            "lname": "mortgage",
            "__v": 0,
            "versionComment": "new update",
            "publishedOn": "2018-12-05T07:53:13.237Z",
            "name": "mortgage"
        }
    },
    {
        "resourceType": "dialog",
        "resourceId": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
        "sbResourceId": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
        "status": "SUCCESS",
        "result": {
            "visibility": {
                "namespace": "enterprise",
                "namespaceIds": [
                    "o-23b63f37-89e7-52e9-bc5d-8012cbda0d4a"
                ]
            },
            "contextLifeTime": {
                "options": "close"
            },
            "version": "1.0",
            "nodes": [
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false,
                        "message": [],
                        "errorMessage": []
                    },
                    "nodeId": "intent0",
                    "type": "intent",
                    "transitions": [
                        {
                            "default": "entity2",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy0"
                            }
                        }
                    ],
                    "metadata": {
                        "left": 175,
                        "top": 64
                    },
                    "componentId": "dc-4a22c00f-a5f8-5c2b-819b-db264a4a399b"
                },
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false,
                        "isOptional": false,
                        "message": [],
                        "errorMessage": [],
                        "precedence": "entityOverIntent"
                    },
                    "nodeId": "entity1",
                    "type": "entity",
                    "transitions": [
                        {
                            "default": "entity3",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy1"
                            }
                        }
                    ],
                    "metadata": {
                        "left": 235,
                        "top": 396
                    },
                    "componentId": "dc-d2794a44-f565-5de3-8073-5321a773c044"
                },
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "node",
                            "type": {
                                "option": "developer"
                            },
                            "interruptsEnabled": true,
                            "holdUxOptions": {
                                "option": "discardCurrTaskNoNotify",
                                "message": ""
                            }
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false,
                        "message": [],
                        "errorMessage": [],
                        "isOptional": false,
                        "precedence": "entityOverIntent"
                    },
                    "nodeId": "entity2",
                    "type": "entity",
                    "transitions": [
                        {
                            "default": "entity1",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy3"
                            }
                        }
                    ],
                    "metadata": {
                        "left": 175,
                        "top": 227
                    },
                    "componentId": "dc-9f065640-c0b6-5e86-8de7-d19997adb487"
                },
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false,
                        "message": [],
                        "errorMessage": [],
                        "precedence": "entityOverIntent"
                    },
                    "nodeId": "entity3",
                    "type": "entity",
                    "transitions": [
                        {
                            "default": "message4",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy5"
                            }
                        }
                    ],
                    "metadata": {
                        "left": 768,
                        "top": 404
                    },
                    "componentId": "dc-8f9c6361-47f7-519b-950d-0b97b5b80ffb"
                },
                {
                    "nodeOptions": {
                        "transitionType": "auto",
                        "promptOptions": "required",
                        "reuseMarkedupPhrases": false,
                        "interruptOptions": {
                            "priority": "task"
                        },
                        "transitionMode": "initiateCurrentTask",
                        "inputHandlingOptions": "useAsEntityValue",
                        "reuseOptions": "1",
                        "noAutoCorrection": false,
                        "notForReuse": false,
                        "message": [],
                        "errorMessage": []
                    },
                    "nodeId": "message4",
                    "type": "message",
                    "transitions": [
                        {
                            "default": "end",
                            "metadata": {
                                "color": "#299d8e",
                                "connId": "dummy7"
                            }
                        }
                    ],
                    "metadata": {
                        "left": 786,
                        "top": 58
                    },
                    "componentId": "dc-45d51547-e374-5b90-ba1a-3fe620f9ab89"
                }
            ],
            "isPublishedVersion": false,
            "idp": "none",
            "state": "awaitingApproval",
            "languages": [],
            "compatibility": [],
            "adminTaskStatus": "active",
            "editable": true,
            "isHidden": false,
            "approvedLanguages": [],
            "approvalRequestedLanguages": [
                "en"
            ],
            "localeData": {
                "en": {
                    "name": "Support",
                    "shortDesc": "Schedule"
                }
            },
            "isFollowUp": false,
            "interruptOptions": {
                "priority": "bot"
            },
            "_id": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
            "refId": "19ad68d9-beb9-5670-ba73-47cf4e8cb1e7",
            "streamId": "st-b4543a96-49ec-5d95-a120-c6244fc23777",
            "createdBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
            "createdOn": "2018-12-05T07:45:19.402Z",
            "lModBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
            "lMod": "2018-12-05T07:53:13.000Z",
            "lname": "support",
            "__v": 0,
            "versionComment": "new update",
            "publishedOn": "2018-12-05T07:53:13.236Z",
            "name": "Support"
        }
    },
    {
        "resourceType": "NL",
        "status": "SUCCESS",
        "result": {
            "resourceId": "NL",
            "resourceType": "NL",
            "modules": [
                "nl_model",
                "settings"
            ],
            "name": "Natural Language"
        }
    },
    {
        "resourceType": "CHANNELS",
        "status": "SUCCESS",
        "result": {
            "resourceId": "CHANNELS",
            "resourceType": "CHANNELS",
            "modules": [
                "alexa"
            ],
            "name": "Channels"
        }
    },
    {
        "resourceType": "EXTENSIONS",
        "status": "SUCCESS",
        "result": {
            "resourceId": "EXTENSIONS",
            "resourceType": "EXTENSIONS",
            "modules": [
                "botkit",
                "agent_transfer",
                "websdk",
                "events"
            ],
            "name": "Extensions"
        }
    },
    {
        "resourceType": "SETTINGS",
        "status": "SUCCESS",
        "result": {
            "resourceId": "SETTINGS",
            "resourceType": "SETTINGS",
            "modules": [
                "general",
                "bot_variables",
                "pii",
                "ivr",
                "hold_resume",
                "custom_script",
                "advanced"
            ],
            "name": "Settings"
        }
    }
]

Response Codes

Code Description
200 Success
400 Error in response; the response payload shows the exact error description
401 The client app is unauthorized to make the API call; Invalid SDK credentials
412 Request payload didn’t meet the preconditions or passed the required arguments
500 Internal server error
Was this article helpful to you? Yes No