{"id":26470,"date":"2021-01-15T08:24:11","date_gmt":"2021-01-15T08:24:11","guid":{"rendered":"https:\/\/developer.kore.ai\/v8-1\/?p=26470"},"modified":"2021-06-15T10:25:20","modified_gmt":"2021-06-15T09:25:20","slug":"install-sample-bot-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v8-1\/docs\/bots\/api-guide\/install-sample-bot-api\/","title":{"rendered":"Install Sample Bot API"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To install a sample bot.<\/p>\n<p class=\"note\">To use this API, needs the Admin app scope of <em>Bot Create<\/em> under <em>Bot Definition<\/em>.<\/p>\n<p><b>POST <\/b><code>https:\/\/{{host}}\/api\/public\/samplebots\/{{botId}}\/add<\/code><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Path_Parameters\">Path Parameters<\/span><\/h3>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Required\/Optional<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<\/tr>\n<tr>\n<td>host<\/td>\n<td>Required<\/td>\n<td>Environment URL, for example, https:\/\/bots.kore.ai<\/td>\n<\/tr>\n<tr>\n<td>BotID<\/td>\n<td>Required<\/td>\n<td>Bot ID or Stream ID. You can access it from the General Settings page of the bot.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Authorization\">Authorization<\/span><\/h3>\n<p>Invoke the API with JWT in the header with the following syntax:<\/p>\n<p><code>auth: {{JWT}}<br \/>\nAccountId: {{accountId}}<br \/>\nuserId: {{userId}}<br \/>\nbot-language : en <\/code><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Response_Content_Type\">Response Content Type<\/span><\/h3>\n<p><code>application\/json<\/code><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h3>\n<pre>curl -X POST \\\r\n  'https:\/\/{{host}}\/api\/public\/samplebots\/{{bot_id}}\/add' \\\r\n  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\\r\n  -H 'content-type: application\/json' \\\r\n  -H 'AccountId: xexxbaxxxbxbxxxxxxxxcxfb' \\\r\n  -H 'userId: u-fbxxfxxx-axfd-xfcx-abxx-xcxxxxaxexxx' \\\r\n  -H 'bot-language: en \r\n'<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h3>\n<pre>{\r\n    \"visibility\": {\r\n        \"namespace\": \"private\",\r\n        \"namespaceIds\": [\r\n            \"u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660\"\r\n        ]\r\n    },\r\n    \"languages\": [],\r\n    \"screenShots\": [],\r\n    \"downloadCount\": 0,\r\n    \"alerts\": [\r\n        \"l-be9b69b5-dbae-55f1-8499-c0b3db74602c\"\r\n    ],\r\n    \"actions\": [],\r\n    \"dialogs\": [\r\n        \"dg-cbf01287-c284-5fb9-8686-b21c0b54cba6\",\r\n        \"dg-353f3abc-b307-58c2-b0aa-0b1e02635017\"\r\n    ],\r\n    \"widgets\": [],\r\n    \"panels\": [],\r\n    \"forms\": [],\r\n    \"categoryIds\": [\r\n        \"451902a073c071463e2ce7c6\"\r\n    ],\r\n    \"class\": [],\r\n    \"featured\": false,\r\n    \"profileRequired\": true,\r\n    \"sendVcf\": false,\r\n    \"isNLEnabled\": true,\r\n    \"interruptsEnabled\": true,\r\n    \"state\": \"setup\",\r\n    \"defaultLanguage\": \"en\",\r\n    \"_id\": \"st-cf8323be-e50e-5dd3-8870-2c8482e4bc2e\",\r\n    \"modifiedOn\": \"2021-01-12T10:55:11.551Z\",\r\n    \"sBannerColor\": \"#E44929\",\r\n    \"bBannerColor\": \"#E44929\",\r\n    \"createdOn\": \"2021-01-12T10:55:11.115Z\",\r\n    \"createdBy\": \"u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660\",\r\n    \"lastModifiedBy\": \"u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660\",\r\n    \"accountId\": \"5e81ba854b3b29780134c7fb\",\r\n    \"sharedBy\": [],\r\n    \"__v\": 0,\r\n    \"name\": \"Asana Sample_botowner@koreai.in_34\",\r\n    \"keywords\": [],\r\n    \"originalName\": \"Asana Sample\",\r\n    \"icon\": \"58f49848a8429af87912c7f1\",\r\n    \"color\": \"#E44929\"\r\n}\r\n<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"To install a sample bot. To use this API, needs the Admin app scope of Bot Create under Bot Definition. POST https:\/\/{{host}}\/api\/public\/samplebots\/{{botId}}\/add Path Parameters Parameter Required\/Optional Description host Required Environment URL, for example, https:\/\/bots.kore.ai BotID Required Bot ID or Stream ID. You can access it from the General Settings page of the bot. Authorization Invoke...","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-26470","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/26470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/comments?post=26470"}],"version-history":[{"count":4,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/26470\/revisions"}],"predecessor-version":[{"id":27107,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/26470\/revisions\/27107"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/media?parent=26470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/categories?post=26470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/tags?post=26470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}