Skip to main content

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.

Back to API List This API allows you to update the default NLU language for an app using the botId.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/1.1/public/bot/{{botId}}/defaultLanguage
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Settings: Language Management; Admin Console: Language Settings > Language Management

Path Parameters

ParameterRequiredDescription
hostYesThe environment URL. For example, https://platform.kore.ai.
botIdYesBot ID or Stream ID. You can access it from the App Settings page.

Sample Request

curl --location 'https://{{host}}/api/1.1/public/bot/st-5ac72231-5a37-5b71-bb1e-1be02ef0xxxx/defaultLanguage' \
--header 'Content-Type: application/json' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--data '{
"Language": "en"
}'

Body Parameters

ParameterDescriptionRequired
languageCodeThe ISO language code, for example en-US for American English or es-ES for Spanish.Required

Sample Response

Success Response

{
  "status": "success",
  "message": "Default language has been updated successfully.",
  "language code": "en-US"
}

Error Responses

Scenario 1: Missing scope from the app.
{
  "errors": [{
    "message": "Permission denied. Scope is incorrect!",
    "code": 4002
  }]
}
Scenario 2: Language not configured.
Cannot set default language. The language '{{language code}}' is not currently configured.
Please configure the language and publish the app at least once before setting it as the default.
Scenario 3: Language already set as default.
Permission denied. The language '{{language code}}' is already set as the default language.
Scenario 4: Language is disabled.
Unable to change the default language. The language '{{language code}}' is currently disabled.
Please enable the language before setting it as the default.
Scenario 5: App not published for the language.
{
  "status": "Error",
  "message": "Unable to set default language. Please perform a full publish of the app, including all content for {{language code}}, before setting it as the default language."
}
Scenario 6: Invalid language code.
Error message: Please provide the valid language code.
  • There is no rollback once the API execution is complete.
  • No publishing is required to display the default language in published mode.
  • Once the API is executed, the default language is reflected immediately.