To get user analytics.
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 the API with JWT in the header with the following syntax:
auth: {{JWT}}
AccountId: {{accountId}}
userId: {{userId}}
bot-language : en
Response Content Type
application/json
Sample Request
curl -X POST \ 'https://{{host}}/api/public/samplebots/{{bot_id}}/add' \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json' \ -H 'AccountId: xexxbaxxxbxbxxxxxxxxcxfb' \ -H 'userId: u-fbxxfxxx-axfd-xfcx-abxx-xcxxxxaxexxx' \ -H 'bot-language: en '
Sample Response
{ "visibility": { "namespace": "private", "namespaceIds": [ "u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660" ] }, "languages": [], "screenShots": [], "downloadCount": 0, "alerts": [ "l-be9b69b5-dbae-55f1-8499-c0b3db74602c" ], "actions": [], "dialogs": [ "dg-cbf01287-c284-5fb9-8686-b21c0b54cba6", "dg-353f3abc-b307-58c2-b0aa-0b1e02635017" ], "widgets": [], "panels": [], "forms": [], "categoryIds": [ "451902a073c071463e2ce7c6" ], "class": [], "featured": false, "profileRequired": true, "sendVcf": false, "isNLEnabled": true, "interruptsEnabled": true, "state": "setup", "defaultLanguage": "en", "_id": "st-cf8323be-e50e-5dd3-8870-2c8482e4bc2e", "modifiedOn": "2021-01-12T10:55:11.551Z", "sBannerColor": "#E44929", "bBannerColor": "#E44929", "createdOn": "2021-01-12T10:55:11.115Z", "createdBy": "u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660", "lastModifiedBy": "u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660", "accountId": "5e81ba854b3b29780134c7fb", "sharedBy": [], "__v": 0, "name": "Asana Sample_botowner@koreai.in_34", "keywords": [], "originalName": "Asana Sample", "icon": "58f49848a8429af87912c7f1", "color": "#E44929" }