Skip to main content
POST
/
knowledge-bases
/
{kb_id}
/
documents
Upload Documents
curl --request POST \
  --url https://api.example.com/knowledge-bases/{kb_id}/documents

Path Parameters

ParameterTypeDescription
kb_idstringKnowledge base ID

Request

Content-Type: multipart/form-data
FieldTypeDescription
filesfile[]Documents to upload (PDF, TXT, MD, DOCX, and supported text formats)

Processing

Uploaded files are saved and queued for background ingestion:
  1. Chunking — split into overlapping segments
  2. Embedding — vector representations generated
  3. Storage — persisted for retrieval

Response

{
  "kb_id": "kb_abc123",
  "job_id": "kb_ingest_a1b2c3d4e5f6",
  "files_queued": 1,
  "status": "processing"
}
Poll GET /api/v1/batches/{job_id} to track ingestion progress.