To initiate the addition and enablement of a new language for a virtual assistant.
| Method | POST |
| Endpoint | https://{{host}}/api/1.1/public/bot/{{botId}}/language |
| Content Type | application/json |
| Authorization | auth: {{JWT}}
|
| API Scope |
|
Path Parameters
| Parameter | Required | Description |
|---|---|---|
| host | Yes | The environment URL. For example, https://bots.kore.ai. |
| botId | Yes | Bot ID or Stream ID. You can access it from the General Settings page of the bot. |
Sample Request
curl --location 'https://bots.kore.ai/api/1.1/public/bot/st-70xx8595-ebcf-58xf-9xx7-5da61fexxxxx/language' \
--header 'Content-Type: application/json' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--data '{
"enableLanguage": "es",
"langDefinitionMode":
{
"baseLanguage": "en",
"type": "advancedConfig",
"preferredData":
{
"training": true,
"faqs": true,
"ontology": true,
"smalltalk": true,
"traits": true
}
},
"multiLingualConfigurations":
{
"nluLanguage": "en",
"inputTranslation": true,
"responseTranslation": true
}
}'
Body Parameters
| Parameter | Description | Mandate |
|---|---|---|
| enableLanguage | The language to be enabled based on the language code. | Required |
| langDefinitionMode | The Language Definition Mode object. | Required |
| langDefinitionMode.baseLanguage | Base language of the Virtual Assistant. | Required |
| langDefinitionMode.type | Type of language enablement Basic, advancedConfig, or fileUpload. | Required |
| langDefinitionMode.fileId | The file ID for handling the file upload if the fileUpload language enablement is selected. | Optional |
| langDefinitionMode.preferredData | If the advancedConfig language enablement is selected, the True/False configuration setting for “training”, “faqs”, “ontology”, “Smalltalk” and “traits” keys should be included. | Optional |
| multiLingualConfigurations | The multi Lingual Configurations object. | Required |
| multiLingualConfigurations.nluLanguage | Refers to the language code of the bot language. | Required |
| multiLingualConfigurations.inputTranslation | Refers to True/False setting for the input language translation to English. | Required |
| multiLingualConfigurations.responseTranslation | Refers to the True/False setting for the response language translation to English. | Required |
Sample Response
For success case:
{
"message": "Enabled Spanish language successfully",
"configurationDetails": {
"dialogs": 2,
"alerts": 0,
"actions": 0,
"knowledgetTasks": 0,
"smallTalk": 1,
"panels": 0,
"widgets": 0
}
}