Integrate CorpusFabric into your applications with our REST API.
All API requests require an API key passed in the X-API-Key header.
Generate API keys from Settings → API Keys in your dashboard.
/api/workspaces/{id}/queryRAG query with streaming response
/api/workspaces/{id}/documentsList documents
/api/workspaces/{id}/documents/upload-urlGet presigned upload URL
/api/workspaces/{id}/documents/{docId}/trigger-indexTrigger document indexing
/api/workspaces/{id}/documents/{docId}Delete a document
/api/workspaces/{id}/foldersList folders
/api/workspaces/{id}/foldersCreate a folder
/api/workspaces/{id}/crawlStart a web crawl
/api/workspaces/{id}/analytics/summaryGet analytics summary
/api/widget/{id}/queryPublic widget query (no auth)
The query endpoint returns Server-Sent Events (SSE). Each event is a JSON object with a type field:
data: {"type": "token", "content": "The answer..."}
data: {"type": "citations", "citations": [...]}
data: {"type": "follow_ups", "questions": [...]}
data: {"type": "done"}
Configure webhooks in Settings → Webhooks to receive real-time notifications.
doc.indexed — Document finished indexingcrawl.complete — Web crawl finishedquery.received — New query receivedRequests include an X-Webhook-Signature header (HMAC-SHA256) for verification.