hubKnowledge Base
Knowledge Base/API Documentation
v2.4.0-Stable· 64 endpoints · 18 resource groups

REST API Reference

Resource-oriented URLs. JSON-encoded responses. Standard HTTP codes, authentication, and verbs. All endpoints are prefixed with /api/v1.

API Conventions

Base path/api/v1/
AuthenticationAuthorization: Bearer <JWT> on all non-public endpoints
Content typeapplication/json for bodies; multipart/form-data for file uploads
Paginationpage (1-based) + size query params → { items, total, page, page_size, pages }
Error format{ "detail": "<message>" } with appropriate HTTP status codes
Soft deletesDELETE performs soft-delete (deleted=true); data remains in DB
TimestampsISO 8601 UTC format on all datetime fields
IDsAll resource IDs are 64-bit integers
API explorerSwagger UI: /api/docs · ReDoc: /api/redoc · OpenAPI JSON: /api/openapi.json

Authentication Header

# All non-PUBLIC endpoints require this header Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... # Obtained via ZITADEL OAuth 2.0 PKCE flow # Service accounts: exchange ZITADEL JSON key for JWT

Pagination Envelope

{ "items": [...], "total": 142, "page": 1, "page_size": 20, "pages": 8 }

Endpoint Reference

favorite

Health

2 endpoints
MethodPath
GET/api/v1/health
GET/api/v1/health/ready
lock_open

Authentication

4 endpoints
MethodPath
POST/api/v1/auth/callback
GET/api/v1/auth/me
PUT/api/v1/auth/me
POST/api/v1/auth/logout
description

Documents

16 endpoints
MethodPath
GET/api/v1/documents
POST/api/v1/documents
GET/api/v1/documents/starred
GET/api/v1/documents/{id}
PUT/api/v1/documents/{id}
DELETE/api/v1/documents/{id}
PATCH/api/v1/documents/{id}/status
POST/api/v1/documents/{id}/upload
GET/api/v1/documents/{id}/download
POST/api/v1/documents/{id}/lock
POST/api/v1/documents/{id}/unlock
POST/api/v1/documents/{id}/star
DELETE/api/v1/documents/{id}/star
GET/api/v1/documents/{id}/retention
PUT/api/v1/documents/{id}/retention
DELETE/api/v1/documents/{id}/retention
folder

Folders

8 endpoints
MethodPath
GET/api/v1/folders
POST/api/v1/folders
GET/api/v1/folders/{id}
PUT/api/v1/folders/{id}
DELETE/api/v1/folders/{id}
GET/api/v1/folders/{id}/children
POST/api/v1/folders/{id}/move
GET/api/v1/folders/{id}/path
account_tree

Workflows

5 endpoints
MethodPath
POST/api/v1/workflows
GET/api/v1/workflows/{id}
POST/api/v1/workflows/{id}/steps/{step_id}/approve
POST/api/v1/workflows/{id}/steps/{step_id}/reject
DELETE/api/v1/workflows/{id}
chat_bubble

Comments

7 endpoints
MethodPath
GET/api/v1/comments/document/{document_id}
POST/api/v1/comments
PUT/api/v1/comments/{id}
DELETE/api/v1/comments/{id}
POST/api/v1/comments/{id}/resolve
POST/api/v1/comments/{id}/react
DELETE/api/v1/comments/{id}/react
label

Tags

9 endpoints
MethodPath
GET/api/v1/tags
POST/api/v1/tags
GET/api/v1/tags/{id}
PUT/api/v1/tags/{id}
DELETE/api/v1/tags/{id}
GET/api/v1/tags/autocomplete
GET/api/v1/documents/{id}/tags
POST/api/v1/documents/{id}/tags
DELETE/api/v1/documents/{id}/tags
admin_panel_settings

Permissions

8 endpoints
MethodPath
GET/api/v1/permissions/document/{doc_id}
GET/api/v1/permissions/folder/{folder_id}
POST/api/v1/permissions/document
POST/api/v1/permissions/folder
PUT/api/v1/permissions/{id}
DELETE/api/v1/permissions/{id}
GET/api/v1/permissions/my/document/{doc_id}
GET/api/v1/permissions/my/folder/{folder_id}
notifications

Notifications

3 endpoints
MethodPath
GET/api/v1/notifications
GET/api/v1/notifications/unread-count
POST/api/v1/notifications/{id}/read
domain

Organizations

4 endpoints
MethodPath
GET/api/v1/organizations/me
GET/api/v1/organizations/me/stats
PUT/api/v1/organizations/me
GET/api/v1/organizations
group

Users

5 endpoints
MethodPath
GET/api/v1/users
GET/api/v1/users/{id}
PUT/api/v1/users/{id}/role
POST/api/v1/users/{id}/deactivate
POST/api/v1/users/{id}/activate
mail

Invitations

3 endpoints
MethodPath
POST/api/v1/users/invite
GET/api/v1/invitations/{token}
POST/api/v1/invitations/{token}/use
corporate_fare

Departments

5 endpoints
MethodPath
GET/api/v1/departments
POST/api/v1/departments
GET/api/v1/departments/{id}
PUT/api/v1/departments/{id}
DELETE/api/v1/departments/{id}
psychology

AI

2 endpoints
MethodPath
GET/api/v1/ai/documents/{id}
POST/api/v1/ai/reindex/{id}
forum

Chat (Document Q&A)

2 endpoints
MethodPath
POST/api/v1/chat/document/{id}
GET/api/v1/chat/sessions
swap_horiz

WebSocket

1 endpoint
MethodPath
WS/api/v1/ws/{document_id}?token=<jwt>

Data Models

Document Object

{ "id": 1042, "title": "Q4 Financial Report", "file_name": "q4-2025-financials.pdf", "file_size_bytes": 2048000, "mime_type": "application/pdf", "status": "APPROVED", // DRAFT|IN_REVIEW|PENDING_APPROVAL|APPROVED|PUBLISHED|ARCHIVED "document_type": "FINANCIAL", "owner_id": 5, "organization_id": 2, "department_id": 8, "folder_id": 17, "current_version_number": 3, "view_count": 24, "download_count": 6, "comment_count": 4, "page_count": 18, "word_count": 4200, "checksum": "a3f2b1...", // SHA-256 for tamper detection "retention_until": "2027-12-31T23:59:59Z", "is_locked": false, "locked_by_id": null, "is_starred": true, "tags": ["finance", "Q4", "board"], "ai_processed": true, "ai_classification": "FINANCIAL_REPORT", "ai_confidence": 0.97, "ai_summary": "Quarterly financial results showing 18% revenue growth...", "ai_keywords": ["revenue", "Q4", "board"], "ai_entities": { "people": [...], "organizations": [...], "dates": [...] }, "chunk_index_status": "INDEXED", // NOT_INDEXED|QUEUED|INDEXED|FAILED "chunk_indexed_at": "2026-01-15T10:32:00Z", "created_at": "2026-01-14T09:00:00Z", "updated_at": "2026-01-15T11:00:00Z" }

Permission Grant Object

{ "id": 301, "permission_type": "WRITE", // NONE|READ|DOWNLOAD|COMMENT|CONTRIBUTOR|WRITE|EDITOR|ADMIN "resource_type": "document", // "document" or "folder" "resource_id": 1042, "user_id": 12, "department_id": null, // grant to dept: all current + future members inherit "expires_at": "2026-06-30T23:59:59Z", // null = permanent "created_at": "2026-01-10T08:00:00Z" }

Workflow Object

{ "id": 88, "document_id": 1042, "status": "IN_PROGRESS", "created_by_id": 5, "created_at": "2026-01-15T12:00:00Z", "steps": [ { "id": 201, "step_number": 1, "assignee_id": 9, "status": "APPROVED", "comment": "Looks good.", "decided_at": "2026-01-16T09:30:00Z" }, { "id": 202, "step_number": 2, "assignee_id": 3, "status": "PENDING", "comment": null, "decided_at": null } ] }

Share Link Object

{ "id": 55, "token": "sl_abc123xyz", "document_id": 1042, "created_by_id": 5, "expires_at": "2026-02-01T23:59:59Z", "is_password_protected": true, "allowed_email": null, // null = any email; set to restrict to one address "access_count": 3, "is_active": true, "created_at": "2026-01-15T14:00:00Z" }

Real-Time Protocols

WSWebSocket — Collaboration

Authenticated using the same OIDC JWT as REST API calls (passed as query param).

ws://host/api/v1/ws/{document_id}?token=<jwt> // Events received: { "type": "presence_join", "user_id": 12, "display_name": "Sarah K." } { "type": "presence_leave", "user_id": 12 } { "type": "cursor", "user_id": 12, "position": { "x": 420, "y": 220 } } { "type": "lock_acquired", "locked_by_id": 12 } { "type": "lock_released" }

SSEServer-Sent Events — Document Q&A

The chat endpoint streams LLM responses token-by-token. Enables progressive UI rendering without long-polling.

POST /api/v1/chat/document/{id} { "message": "What are the key findings?", "session_id": null } // SSE stream response: data: {"type": "token", "content": "The"} data: {"type": "token", "content": " contract"} data: {"type": "token", "content": " was signed"} ... data: {"type": "done", "session_id": 42, "citations": [...], "token_count": 87}

File Downloads — Presigned URLs

File bytes never flow through the VyXlo API server. The download endpoint returns a 15-minute presigned MinIO URL. The client fetches the file directly from object storage, which scales to very large files without API server memory pressure.

GET /api/v1/documents/1042/download Authorization: Bearer <access_token> // Response: { "url": "https://minio.example.com/bucket/q4-financials.pdf?X-Amz-Expires=900...", "expires_in": 900 } // Client fetches directly from MinIO — zero API server bandwidth