API Overview
DokuBrain REST API — base URL, versioning, request format, and conventions.
API Overview
The DokuBrain API is a RESTful, JSON-based API. All requests must be authenticated and made over HTTPS in production.
Base URL
| Environment | Base URL |
|---|---|
| Production | https://api.dokubrain.com/api/v1 |
| Local development | http://localhost:8000/api/v1 |
Request format
- All request bodies must be
application/jsonunless uploading files - File uploads use
multipart/form-data - All responses return JSON with a consistent envelope:
Pagination
List endpoints support pagination:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
limit | number | 20 | Results per page (max 100) |
offset | number | 0 | Number of items to skip |
sort | string | createdAt | Field to sort by |
order | string | desc | Sort direction (asc or desc) |
API endpoints
| Resource | Base path | Description |
|---|---|---|
| Authentication | /auth | Register, login, tokens, sessions |
| Ingestion | /ingestion | Upload and ingest documents |
| Documents | /documents | Document management, extraction, insights |
| Projects | /projects | Organize documents into projects |
| Corpus | /corpus | RAG queries, hybrid search, and AI reasoning |
| Workflows | /workflows | Automated processing pipelines |
| Templates | /templates | Extraction template management |
| Reports | /reports | Report creation and execution |
| API Keys | /api-keys | API key management |
| Governance | /governance | Policies, compliance, and audit logs |
Versioning
The API is versioned via the URL path (/api/v1/). Breaking changes are introduced in new versions. Non-breaking changes (new fields, new endpoints) are added to the current version.
Rate limits
All authenticated endpoints are rate-limited. Specific limits vary by endpoint and plan. Rate limit headers are included in every response:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Remaining | Remaining requests in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |