API Overview
The DocMap API provides REST endpoints for extracting structured data from PDF documents using AI-powered templates.
Base URL
All API requests are made to:
https://api.docmap.ioAll versioned endpoints are prefixed with /v1/.
Authentication
All /v1/* endpoints require an Authorization header with a Bearer token. You can use either an API key or a Firebase ID token:
Authorization: Bearer dm_live_abc123def456ghi789jkl012mno345API keys can be created and managed from Dashboard > Settings > API Keys or via the API Keys endpoints. See the Authentication guide for details.
Content Type
All request and response bodies use JSON:
Content-Type: application/jsonRate Limits
Extraction requests are subject to monthly limits based on your plan. Use the GET /v1/usage endpoint to check your current consumption. See the Rate Limits guide for per-plan quotas.
Endpoints Summary
| Method | Path | Description |
|---|---|---|
GET | /health | Health check (unauthenticated) |
POST | /v1/extractions/run | Run an extraction on a PDF document |
GET | /v1/extractions | List extraction records |
DELETE | /v1/extractions/{id} | Delete an extraction record |
GET | /v1/usage | Get current usage for the billing period |
POST | /v1/api-keys | Create a new API key |
GET | /v1/api-keys | List all active API keys |
DELETE | /v1/api-keys/{id} | Revoke an API key |
Health Check
GET /health is the only unauthenticated endpoint. Use it to verify the API is reachable.
curl https://api.docmap.io/healthconst res = await fetch('https://api.docmap.io/health')
const data = await res.json()
console.log(data) // { status: "ok" }import requests
res = requests.get("https://api.docmap.io/health")
print(res.json()) # {"status": "ok"}Response:
{ "status": "ok" }Error Format
All error responses follow a consistent structure:
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key."
}
}See the Error Codes reference for a full list of error codes and their meanings.
OpenAPI Spec
The full OpenAPI specification is available for tooling and client generation:
- OpenAPI JSON: https://api.docmap.io/openapi.json
- Swagger UI: https://api.docmap.io/docs
