Elizon Docs
API Reference

Upload documents

POST /api/v1/knowledge-bases/:knowledgeBaseId/documents — add files to a Knowledge Base.

Uploads one or more files. Each one is extracted, chunked, embedded and indexed in the background; the call returns as soon as the files are accepted. Follow their progress with List documents.

POST /api/v1/knowledge-bases/{knowledgeBaseId}/documents
Content-Type: multipart/form-data

Form fields

FieldTypeRequiredDescription
filesfile, repeatedYesOne part per file. At most 10 files per request and 50 MB per file.
chunkingStrategystringNofixed (default), recursive, token, semantic, late, row or json. See Documents.
chunkSizeintegerNoTarget chunk size. Default 1000.
overlapintegerNoOverlap between chunks. Default 200.
metadataJSON stringNoMetadata applied to every file in this request, validated against the Knowledge Base's metadata fields.

Response

202 Accepted

{
  "documents": [{ "documentId": "9d0a…", "filename": "pump-x200.pdf", "status": "PENDING" }]
}

Errors

StatuserrorWhen
400invalid_requestNo files part, an unsupported file type, or chunking settings the service refuses.
403forbiddenYour key is scoped to a different project.
404not_foundNo such Knowledge Base in your organization.
413payload_too_largeA file is over 50 MB.
413too_many_filesMore than 10 files in one request. Send the rest in another request.
415unsupported_media_typeThe request is not multipart/form-data.

Example

curl -X POST https://api.elizon.ai/api/v1/knowledge-bases/4f1c…/documents \
  -H "X-API-Key: elz_your_key_here" \
  -F "files=@pump-x200.pdf" \
  -F "files=@pump-x300.pdf" \
  -F "chunkingStrategy=recursive"