> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Bot Variables Export API

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/automation/api-list)</Badge>

Export environment and locale (content) variables from a bot. The endpoint retrieves all configured variables, including their values, types, scopes, and namespace associations.

| Field             | Value                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | POST                                                                                                                            |
| **Endpoint**      | `https://{{host}}/api/{{version}}/public/builder/bot/{{botId}}/variables/export`                                                |
| **Content Type**  | `application/json`                                                                                                              |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction#generating-the-jwt-token). |
| **API Scope**     | App Builder: Export Variables; Admin Console: Not Applicable                                                                    |

## Path Parameters

| Parameter        | Required | Description                                                         |
| ---------------- | -------- | ------------------------------------------------------------------- |
| `host`           | Required | Environment URL, for example: `https://platform.kore.ai`.           |
| `botId/streamId` | Required | App ID or Bot ID. Access it via **App Settings** → **App Profile**. |
| `version`        | Required | API version, for example: `1.1`.                                    |

## Sample Request

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

## Sample Response

```json theme={null}
[
    {
        "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:

| Parameter                        | Type    | Description                                                              |
| -------------------------------- | ------- | ------------------------------------------------------------------------ |
| `key`                            | string  | The unique name of the variable.                                         |
| `value`                          | string  | The value assigned to the variable.                                      |
| `hint`                           | string  | Optional description or hint text.                                       |
| `variableType`                   | string  | Type of variable: `env` for environment, `locale` for content.           |
| `scope`                          | string  | Scope of the variable, for example `prePopulated`.                       |
| `group`                          | string  | Optional group name for organizing related variables.                    |
| `propagateValue`                 | boolean | Whether the variable value should be propagated.                         |
| `vNameSpace`                     | array   | Namespace objects where this variable is available.                      |
| `vNameSpace[].name`              | string  | Name of the namespace.                                                   |
| `vNameSpace[].refId`             | string  | Reference ID of the namespace.                                           |
| `isSecured`                      | boolean | Whether the variable contains sensitive or encrypted data.               |
| `audioTag`                       | string  | Audio tag associated with the variable (primarily for locale variables). |
| `localeData`                     | object  | Locale-specific values; present only when `variableType` is `locale`.    |
| `localeData.localeCode`          | string  | Locale identifier, for example `en`, `fr`, `ja`.                         |
| `localeData.localeCode.audioTag` | string  | Audio tag for text-to-speech use cases.                                  |
| `localeData.localeCode.hint`     | string  | Optional hint for the localized value.                                   |
| `localeData.localeCode.value`    | string  | Localized message or text for the locale.                                |
