API Endpoints
The DocPeel REST API is hosted at https://api.docpeel.com. All endpoints accept and return JSON — file uploads are sent as base64 strings inside the JSON body, so there is no multipart/form-data anywhere in the API. Every response includes a request_id you can quote to support.
Create an extraction
/v1/extractionsSubmit a document for synchronous extraction. The request body is JSON with the file bytes base64-encoded; the response returns the completed result, typically within a few seconds.
Request body
| Field | Type | Description |
|---|---|---|
file | string (base64) | Document bytes, base64-encoded. PDF, JPEG, PNG, or WebP. Max 20 MB decoded. |
file_name | string | Original file name with extension (e.g. invoice.pdf). Required. |
content_type | string? | MIME type. Auto-inferred from file_name when omitted. |
template_id | string? | Optional template to guide extraction. |
Example
# Encode locally, then POST as JSON
FILE_B64=$(base64 -i ./invoice.pdf)
curl https://api.docpeel.com/v1/extractions \
-H "Authorization: Bearer $DOCPEEL_API_KEY" \
-H "Content-Type: application/json" \
-d "{
"file": "$FILE_B64",
"file_name": "invoice.pdf",
"content_type": "application/pdf",
"template_id": "tpl_invoice"
}"Retrieve an extraction
/v1/extractions/{id}Fetch a single extraction by ID. Only extractions in your workspace are returned.
curl https://api.docpeel.com/v1/extractions/ext_01HZX... \
-H "Authorization: Bearer $DOCPEEL_API_KEY"API key metadata
/v1/meVerify a key and inspect its scopes and workspace. Useful for health checks.
Rate limits
Every API key is rate-limited per minute and per day, scaled to the workspace's active plan. Both windows are enforced — exceeding either returns 429 rate_limited with a Retry-After header.
| Plan | Requests / minute | Requests / day |
|---|---|---|
| Free | 10 | 25 |
| Basic | 30 | 500 |
| Pro | 60 | 2,000 |
| Business | 120 | 10,000 |
Every response includes the current quota in headers so clients can back off proactively:
X-RateLimit-Limit/X-RateLimit-Remaining/X-RateLimit-Reset— minute windowX-RateLimit-Limit-Day/X-RateLimit-Remaining-Day/X-RateLimit-Reset-Day— daily windowRetry-After— seconds until the violated window resets (only on429)
Need higher limits? Contact support for an enterprise quota.