Import and process document
POST/api/admin/document/csvImport
Upload and process CSV, XLSX, PDF, or DOCX files
Request​
- multipart/form-data
Body
filebinaryrequired
user_tokenstring
chat_model_tokenstring
chatModelIdstring[]required
Responses​
- 200
- 400
- 405
- 500
File uploaded and processed successfully
- application/json
- Schema
- Example (from schema)
Schema
messagestring
Example: 
File uploaded successfullyfilestring
Example: 
/tmp/uploaded_file.csv{
  "message": "File uploaded successfully",
  "file": "/tmp/uploaded_file.csv"
}
Bad request
- application/json
- Schema
- Example (from schema)
Schema
errorstring
Example: 
Only CSV, XLSX, PDF, and DOCX files are allowed{
  "error": "Only CSV, XLSX, PDF, and DOCX files are allowed"
}
Method not allowed
- application/json
- Schema
- Example (from schema)
Schema
errorstring
Example: 
Method not allowed{
  "error": "Method not allowed"
}
Internal server error
- application/json
- Schema
- Example (from schema)
Schema
errorstring
Example: 
Error processing file{
  "error": "Error processing file"
}