Upload and create a new dataset in a specific knowledgebase. The dataset will be processed and embedded for semantic search.
Base URL
Endpoint
POST https://api.pathors.com/knowledgebases/{knowledgebaseId}/datasets
Path Parameters
The unique identifier of the knowledgebase where the dataset will be created
Your project API key for authentication
Must be multipart/form-data
Request Body
The dataset file to upload. Supported formats: PDF, TXT, DOCX, and other text-based formats
Example request:
curl -X POST \
-H "x-api-key: your_api_key" \
-F "dataset=@/path/to/your/file.pdf" \
https://api.pathors.com/knowledgebases/kb_abc123/datasets
Response
Returns a success message indicating the dataset was uploaded and is being processed.
Success message describing the upload status
Indicates whether the upload was successful
Example response:
{
"message": "Dataset Uploaded successfully, currently embedding in the background",
"success": true
}
Processing Flow
- Upload Validation: The file is validated for format and size
- Knowledgebase Verification: Ensures the knowledgebase exists and belongs to your project
- File Storage: The dataset is stored in the system
- Background Processing: The dataset is processed and embedded asynchronously
- Chunking: The content is split into searchable chunks
- Embedding: Chunks are converted to vector embeddings for semantic search
- PDF documents
- Plain text files (.txt)
- Microsoft Word documents (.docx)
- Other text-based formats
Error Responses
| Status Code | Description |
| 400 | Invalid request (missing file, invalid format, or knowledgebase ID) |
| 401 | Invalid API key |
| 404 | Knowledgebase not found or access denied |
| 500 | Internal server error |
Usage Notes
- Processing happens asynchronously after upload
- Large files may take several minutes to process
- You can check processing status through the datasets listing endpoint
- The knowledgebase must exist and belong to your project
- File size limits apply (check your plan limits)