Skip to main content
Back to API List Export environment and locale (content) variables from a bot. The endpoint retrieves all configured variables, including their values, types, scopes, and namespace associations.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/{{version}}/public/builder/bot/{{botId}}/variables/export
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Export Variables; Admin Console: Not Applicable

Path Parameters

ParameterRequiredDescription
hostRequiredEnvironment URL, for example: https://platform.kore.ai.
botId/streamIdRequiredApp ID or Bot ID. Access it via App SettingsApp Profile.
versionRequiredAPI version, for example: 1.1.

Sample Request

curl --location --request POST 'https://{{host}}/api/1.1/public/builder/bot/{{botId}}/variables/export' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'

Sample Response

[
    {
        "key": "host_url",
        "value": "https://{{host}}/nodeutil/mocks/getTime?timeZone=America/Chicago",
        "hint": "",
        "variableType": "env",
        "scope": "prePopulated",
        "group": "",
        "propagateValue": false,
        "vNameSpace": [
            {
                "name": "namespace1",
                "refId": "7eb3cfb6-0885-5c0b-be3d-00de695xxxxx"
            }
        ],
        "isSecured": false
    },
    {
        "key": "DAI_DF_INVALID_PHONE_NUMBER_DURING_DEFLECTION",
        "audioTag": "",
        "variableType": "locale",
        "scope": "prePopulated",
        "localeData": {
            "en": {
                "audioTag": "",
                "hint": "",
                "value": "The Number you entered #Phone Number# is invalid. Please Enter a Valid Phone Number with the Country Code."
            }
        },
        "group": "",
        "propagateValue": false,
        "isSecured": false
    }
]

Response Parameters

Returns an array of variable objects. Each object contains the following fields:
ParameterTypeDescription
keystringThe unique name of the variable.
valuestringThe value assigned to the variable.
hintstringOptional description or hint text.
variableTypestringType of variable: env for environment, locale for content.
scopestringScope of the variable, for example prePopulated.
groupstringOptional group name for organizing related variables.
propagateValuebooleanWhether the variable value should be propagated.
vNameSpacearrayNamespace objects where this variable is available.
vNameSpace[].namestringName of the namespace.
vNameSpace[].refIdstringReference ID of the namespace.
isSecuredbooleanWhether the variable contains sensitive or encrypted data.
audioTagstringAudio tag associated with the variable (primarily for locale variables).
localeDataobjectLocale-specific values; present only when variableType is locale.
localeData.localeCodestringLocale identifier, for example en, fr, ja.
localeData.localeCode.audioTagstringAudio tag for text-to-speech use cases.
localeData.localeCode.hintstringOptional hint for the localized value.
localeData.localeCode.valuestringLocalized message or text for the locale.