DocPeeldocs

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

POST/v1/extractions

Submit 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

FieldTypeDescription
filestring (base64)Document bytes, base64-encoded. PDF, JPEG, PNG, or WebP. Max 20 MB decoded.
file_namestringOriginal file name with extension (e.g. invoice.pdf). Required.
content_typestring?MIME type. Auto-inferred from file_name when omitted.
template_idstring?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

GET/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

GET/v1/me

Verify 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.

PlanRequests / minuteRequests / day
Free1025
Basic30500
Pro602,000
Business12010,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 window
  • X-RateLimit-Limit-Day / X-RateLimit-Remaining-Day / X-RateLimit-Reset-Day — daily window
  • Retry-After — seconds until the violated window resets (only on 429)

Need higher limits? Contact support for an enterprise quota.