API reference
HTTP endpoints exposed by the Document Conversion Service.
Overview
Base URL: https://document-conversion-service-q3q1.vercel.app. All document, webhook and API-key
routes live under /api/v1.
When running the stack locally, the base URL is
http://localhost:8000; interactive Swagger docs
(/docs) and the raw
OpenAPI schema are available
there only — they are disabled in production.
Authentication
Send either credential on every protected request:
X-API-Key: dcs_dev_...
Authorization: Bearer <keycloak-access-token>
API keys are scoped (documents:read,
documents:write, webhooks:*,
api-keys:*) and rate-limited per tier.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /api/v1/documents | Upload a document and wait for the record. |
POST | /api/v1/documents/async | Upload and return immediately with a document ID. |
GET | /api/v1/documents | List documents (paginated, filterable). |
GET | /api/v1/documents/{id} | Get document details. |
GET | /api/v1/documents/{id}/status | Poll processing status and progress. |
GET | /api/v1/documents/{id}/result | Fetch the structured JSON result. |
GET | /api/v1/documents/{id}/download | Download the original upload. |
DELETE | /api/v1/documents/{id} | Delete a document and its files. |
POST | /api/v1/documents/batch | Upload up to 50 files at once. |
GET | /api/v1/webhooks | List webhooks. |
POST | /api/v1/webhooks | Create a completion webhook. |
GET | /api/v1/api-keys | List API keys (masked). |
POST | /api/v1/api-keys | Create an API key. |
POST | /api/v1/api-keys/{id}/rotate | Rotate an API key. |
GET | /health | Liveness check. |
GET | /health/ready | Readiness check (DB, Redis, MinIO). |
Examples
Upload asynchronously
curl -X POST https://document-conversion-service-q3q1.vercel.app/api/v1/documents/async \
-H "X-API-Key: $DCS_API_KEY" \
-F "file=@invoice.pdf" \
-F "priority=normal" Poll status
curl https://document-conversion-service-q3q1.vercel.app/api/v1/documents/<id>/status \
-H "X-API-Key: $DCS_API_KEY" Fetch the result
curl https://document-conversion-service-q3q1.vercel.app/api/v1/documents/<id>/result \
-H "X-API-Key: $DCS_API_KEY"