Confluye
Endpoints

Documents

Create, read, and update documents via the API.

Endpoints for documents under /api/v1/documents.

Endpoints

MethodPathDescription
GET/api/v1/documentsList documents
POST/api/v1/documentsCreate a document
GET/api/v1/documents/{id}Get a document
PATCH/api/v1/documents/{id}Update a document

List and create

GET /api/v1/documents returns { documents[] }. Pass ?includeTrashed=true to include trashed documents.

POST /api/v1/documents accepts JSON or multipart/form-data:

FieldTypeNotes
namestringRequired
folderIdstringTarget folder (404 if missing)
contentTextstringInline text content (JSON path)
filefileUploaded file (multipart path)
mimeTypestringContent type
knowledgeBaseId / knowledgeBaseIdsstring / string[]Attach to one or more knowledge bases

Uploaded files support PDF, DOCX, PPTX, HTML, TXT, Markdown, JSON, and CSV — text is extracted automatically. Returns 201 with { document }.

Read and update

GET /api/v1/documents/{id} returns { document } with full details. PATCH /api/v1/documents/{id} branches on the body: { trashed } to trash/restore, { reindex: true } to re-index, { knowledgeBaseIds } to change knowledge-base membership, or { name, contentText, mimeType } to edit content.

Next steps