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

Bot Variables Import API

Imports global and content variables into the bot.

POST https://{{host}}/api/1.1/public/builder/stream/{{stream_id}}/variables/import

Authorization

Invoke the API with JWT in the header with the following syntax:

auth: {{JWT}}

Response content type

application/JSON

Query Parameters

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

Sample Request

curl -X POST \

https://{{host}}/api/1.1/public/builder/stream/{{stream_id}}/variables/import \

-H 'accept: application/json, text/plain, */*' \

-H 'auth: YOUR_JWT_ACCESS_TOKEN' \

-H 'content-type: application/json' \


-d '[

{

"key": "Global",

"value": "Globalkey-prePopulated",

"hint": "",

"variableType": "env",

"scope": "prePopulated"

},

{

"key": "Global-1",

"value": "Global onInstall",

"hint": "",

"variableType": "env",

"scope": "onInstall"

},

{

"key": "Lang",

"variableType": "locale",

"scope": "prePopulated",

"localeData": {

"en": {

"value": "english language prompt",

"hint": ""

},

"zh_cn": {

"value": "Chinese language prompt",

"hint": ""

}

}

}

]'

Sample Response

{
"message": "3 Variables imported/updated successfully."
}
Was this article helpful to you? Yes No