Upload File to Knowledge Base
Upload a file to an existing knowledge base. Supports PDF, TXT, DOCX, MD, CSV, and JSON files up to 50MB.
POST
Headers
x-api-keystringrequiredAPI key used for authenticating requests to the API.
x-workspace-idstringrequiredWorkspace identifier for the API.
Path Parameters
idstringrequiredThe unique identifier of the knowledge base to upload the file to.
Request Body
The request body should be sent as multipart/form-data.
uploadedFilefilerequiredThe file to upload. Supported formats: PDF, TXT, DOCX, MD, CSV, JSON. Maximum file size: 50MB.
Response Fields
successbooleanWhether the file was uploaded successfully.
fileobjectDetails of the uploaded file.
namestringName of the uploaded file.
sizenumberSize of the file in bytes.
typestringMIME type of the file.
{
"success": true,
"file": {
"name": "product-guide.pdf",
"size": 1048576,
"type": "application/pdf"
}
}