Skip to main content
Back to API List To import the ML Utterances into a bot.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/public/bot/{{BotID}}/mlimport
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Utterances Import; Admin Console: Test > Utterances Import and Train

Query Parameters

ParameterDescriptionRequired
hostThe environment URL. For example, https://platform.kore.aiRequired
BotIdBot ID or Stream ID can be accessed under General Settings on the App Builder.Required

Sample Request

curl -X POST 'https://{{host}}/api/public/bot/{{bot ID}}/mlimport' \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
  -H 'content-type: application/json' \
  -d '{
    "fileName":"MLUtterances.json",
    "fileId": "5beed4fd0b9a4b740c09dca2"
  }'

Body Parameters

ParameterDescriptionRequired
fileNameThe full name of the ML Utterances file to be imported.Required
fileIDThe ID of the imported file (provided by the cloud service where the file is uploaded).Required

Sample Response

{
    "status": "pending",
    "streamId": "sx-6exxxxxx-5xx1-5xx0-b9xx-8cxxxxxxxxxx",
    "createdBy": "u-5dxxxxxxxxxxx-5xx0-a3xx-2exxxxxxxxxx",
    "requestType": "MLimport",
    "_id": "bxx-7exxxxxx-5xxb-51xx-bxx5-88xxxxxxxxxx",
    "statusLogs": [],
    "createdOn": "2019-06-27T12:03:30.748Z",
    "__v": 0
}