Skip to main content
Back to API List To upload the botdefinition, botconfig, and botfunction files (if any) and the bot icon to the local server. You can also use this API to upload files for ingestion using Search AI. The API returns the file ID in response which is required in the Import Bot API or Ingest Data API for further actions on the file.
To upload botdefinition, botconfig, and botfunction files, you need to upload the files separately. You can upload a file by signing with any app created by the account administrator.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/public/uploadfile
Content Typemultipart/form-data
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Not Applicable; Admin Console: Not Applicable

Query Parameters

ParameterDescriptionRequired
hostThe environment URL. For example, https://platform.kore.aiRequired

Sample Request

curl -X POST 'https://{{host}}/api/public/uploadfile' \
  -H 'auth: YOUR_JWT_ACCESS_TOKEN' \
  -H 'content-type: multipart/form-data' \
  -F file=@botDefinition.json \
  -F fileContext=bulkImport \
  -F fileExtension=json

Body Parameters

The following parameters are required and passed based on the file type: For Bot Definition File ID:
ParameterDescription
fileUpload the Botdefinition.json file.
fileContextbulkImport
fileExtension.json
For Bot Config File ID:
ParameterDescription
fileUpload the Botconfig.json file.
fileContextbulkImport
fileExtension.json
For Bot Function File ID:
ParameterDescription
fileUpload the Bot function file.
fileContextbulkImport
fileExtension.js
For Bot Icon File ID:
ParameterDescription
fileUpload the Bot icon file.
fileContextbulkImport
fileExtension.json
For ML Utterances File ID:
ParameterDescription
fileUpload the ML Utterance file (.json or .csv).
fileContextbulkImport
fileExtension.json or .csv
For Data Ingestion in Search AI:
ParameterDescription
fileUpload the file to be ingested into the Search AI application.
fileContextfindly
fileExtensionpdf, docx, txt, pptx