Note: You need to upload the files separately.
Method | POST |
Endpoint | https://{{host}}/api/public/uploadfile |
Content Type | application/json |
Authorization |
|
API Scope |
|
Query Parameters
Parameter | Description | Mandate |
---|---|---|
host | The environment URL. For example, https://bots.kore.ai |
Required |
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 id.
For Bot Definition File ID
Parameter | Description |
---|---|
file | Upload the Botdefinition.json file. |
fileContext | bulkImport |
fileExtension | .json |
For Bot Config File ID
Parameter | Description |
---|---|
file | Upload the Botconfig.json file. |
fileContext | bulkImport |
fileExtension | .json |
For Bot Function File ID
Parameter | Description |
---|---|
file | Upload the Bot function file. |
fileContext | bulkImport |
fileExtension | .js |
For Bot icon File ID
Parameter | Description |
---|---|
file | Upload the Bot icon file. |
fileContext | bulkImport |
fileExtension | .json |
For ML Utterances File ID
Parameter | Description |
---|---|
file | Upload the ML Utterance file (.json or .csv) |
fileContext | bulkImport |
fileExtension | .json or .csv |
Sample Response
{ "fileId": "5c077d28d28e06c112681656", "hash": "c275df72765efb7de332e7d54300cb12de66b78e" }