To initiate enable a channel for a virtual assistant.
| Method | POST |
| Endpoint |
|
| Content Type | application/json |
| Authorization |
|
| API Scope |
|
Query Parameters
| Parameter | Description | Mandate |
|---|---|---|
| host | The environment URL. For example, https://bots.kore.ai | Required |
Sample Request
Sample Request for Web/Mobile channel:
curl --location --request POST 'https://{{host}}/api/public/channels' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"streamId": "st-xxxxfxxx-edxx-xxxx-xxbb-fxxxexxfxfcx",
"channelDetails": {
"displayName": "Web / Mobile Client",
"type": "rtm",
"app": {
"clientId": "cs-xexxdxxx-xbbc-xxex-xxef-xxxxxxxxfxfx",
"appName": "app_name"
},
"enable": true
},
"type": "rtm"
}'
Sample Request for MS Teams channel:
curl --location --request POST 'https://{{host}}/api/public/channels' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"streamId": "st-4xx7ccxx-8xx5-5cxx-9xxf-5bxxxxxxxxxx",
"channelDetails": {
"botName": "Banking Bot",
"enable": true,
"type": "msteams",
"appId": "cbabcxce-acxb-xxxx-axxf-xabxxxfexxxb",
"appPassword": ""
},
"type": "msteams"
}'
Sample Request for WebHook channel:
curl --location --request POST 'https://{{host}}/api/public/channels' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"streamId": "st-cxfaxxax-xexx-xxex-axxe-xxdxexxxfxex",
"channelDetails": {
"app": {
"clientId": "cs-dxxcxxxc-Xxxx-xxxx-axxx-xxxxcxbexeax",
"appName": "Banking Bot"
},
"createInstance": true,
"type": "ivr",
"displayName": "webhook1",
"enable": true,
"isAsync": false,
},
"type": "ivr"
}'
Sample Request for Slack channel:
curl --location --request POST 'https://{{host}}/api/public/channels' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"streamId": "st-1bxxxxxx-9xx0-5xxa-abxx-51xxxxxxxxxa",
"channelDetails": {
"displayName": "slack",
"botName":"Banking Bot",
"enable": true,
"type": "slack",
"accessToken": "xoxb-xxxxxxxx-xxxxxx-xxxxxxxxxxxxxxxxxxxxxZ",
"clientId": "xxxxxx.xxxxxx",
"clientSecret": "xxexxdxxxdxcxxbxacxxxdfxxxxxex",
"verificationToken": "abcd"
},
"type": "slack"
}'
Body Parameters
| Parameter | Description | Mandate |
|---|---|---|
| streamId | Stream or Bot ID – You can access it from the General Settings page of the bot. | Required |
| appName | The app associated with this Bot, you can obtain it from the Manage Apps page of the bot | Required |
| clientId | The client id for the app associated with this Bot, you can obtain it from the Manage Apps page of the bot | Required |
| type |
Channel that you want to enable for this Bot. Following are the channel type details:
|
Required |
Sample Response
The response from the platform depends on the channel being enabled.
Sample response for web/mobile SDK:
{
"displayName": "Web / Mobile Client",
"type": "rtm",
"name": "Web / Mobile Client",
"isAlertsEnabled": false,
"enable": true,
"sttEnabled": false,
"sttEngine": "kore"
}
Sample response for webhook channel:
{
"displayName": "webhook",
"enable": true,
"isAsync": false,
"type": "ivr",
"url": "<webhook-url>"
}
Sample response for slack channel:
{
"streamUserAccountId": "su-bxxxxfax-exba-xxeb-xxxc-xxxacxxxxxx",
"type": "slack",
"enable": false,
"verificationToken": "mxxxxxxxxxxxxxxxxxxxxC"
}
Sample response for msteams channel:
{
"type": "msteams",
"enable": false,
"accountId": "su-bcf9xxxfc-dxxx-xxxc-xexa-bxxexxxxxxx",
"app_id": "xxebcfxf-xxxd-xxca-xxea-bxxxxxxaxxx"
}