Skip to main content
Back to API List To initiate the addition and enablement of a new language for an AI Agent.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/{{version-Id}}/public/bot/{{botId}}/language
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Language Configuration; Admin Console: Language Settings > Language Management

Path Parameters

PARAMETERDESCRIPTION
hostThe environment URL. For example, https://platform.kore.ai.

Sample Request

curl -X POST 'https://{{host}}/api/{{version-Id}}/public/bot/{{botId}}/language' \
--header 'Content-Type: application/json' \
--header 'auth: YOUR_JWT_ACCESS_TOKEN' \
--data '{
"enableLanguage" : "",
"langDefinitionMode": {
"baseLanguage": "language_code",
"type": "advancedConfig/fileUpload",
"fileId":"",
"preferredData":{
"training": true/false,
"faqs": true/false,
"ontology": true/false,
"smalltalk": true/false,
"traits": true/false
}
},
"multiLingualConfigurations":{
"nluLanguage": "language_code",
"inputTranslation": true/false,
"responseTranslation": true/false
}
}'

Body Parameters

PARAMETERSUB-PARAMETERDESCRIPTIONMANDATE
enableLanguageThe language to be enabled based on the language code.Required
langDefinitionModeRequired
langDefinitionMode.baseLanguageBase language of the AI Agent.Optional
langDefinitionMode.typeType of language enablement: Basic, advancedConfig, or fileUpload.Optional
langDefinitionMode.fileIdThe file ID for handling the file upload if the fileUpload language enablement is selected.Optional
langDefinitionMode.preferredDataIf the advancedConfig language enablement is selected, the True/False configuration setting for “training”, “faqs”, “ontology”, “Smalltalk” and “traits” keys should be included.Optional
multiLingualConfigurationsRequired
multiLingualConfigurations.nluLanguageRefers to the language code of the NLU language.Required
multiLingualConfigurations.inputTranslationRefers to True/False setting for the input language translation to English.Required
multiLingualConfigurations.responseTranslationRefers to the True/False setting for the response language translation to English.Required

Sample Response

For success case:
[{
"message": "Enabled language successfully",
"configurationDetails": {
"dialogs":3,
"alerts":0,
"actions":0,
"knowledgetTasks":0,
"smallTalk":1,
"panels":0,
"widgets":0
}
}]