Developer API

Welcome to the DocuExtract API. Our RESTful API allows you to programmatically upload documents, extract structured data using AI, and manage your extraction jobs at scale.

Base URL:https://pdfextractor.codebotics.io/api

Authentication

Authentication is performed via the Authorization header using a Bearer token.

Example Header
Authorization: Bearer eyJhbG...
x-org-slug: acme-inc
Keep your keys safe! Never expose your API keys in client-side code (browsers, mobile apps). Always perform API calls from your secure backend.

Extraction API

The core endpoint for processing documents. You can either upload a local PDF/image file as multipart form-data.

POST/jobs

Form Data Parameters

ParameterTypeDescription
filefileThe PDF or Image file to process.
documentTypeenumINVOICE, BANK_STATEMENT, ACCOUNT_LEDGER, etc.
schemaIduuidExisting Template ID to use for extraction.
useVisionbooleanEnable high-fidelity vision processing for complex scans. (Recommended)

Request Example

cURL
curl -X POST https://pdfextractor.codebotics.io/api/jobs \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "x-org-slug: your-org" \
  -F "file=@invoice.pdf" \
  -F "documentType=INVOICE"

Conversion API

Specialized endpoint for converting PDF documents into high-resolution images without full AI extraction. Set documentType=CONVERSION.

POST/jobs
{
  "success": true,
  "data": {
    "jobId": "job_123...",
    "status": "QUEUED"
  }
}

Jobs & Results

Track the status of your extractions and fetch the final structured data.

GET/jobs/:id
Jobs typically take 3-8 seconds depending on page count and vision usage.

Using Templates

Custom templates (Schemas) allow you to define exactly which fields the AI should look for. This is ideal for specific forms like specialized bank statements or custom business invoices.

1. Create Template

Navigate to the **Templates** tab in your dashboard and define your JSON structure.

2. Copy Schema ID

Grab the UUID of your template (e.g., b3a1...).

Passing Schema ID
# Add this field to your multipart request
-F "schemaId=b3a123-..."
-F "isDynamic=false"

Webhooks

Automate your workflow by receiving a POST callback whenever an extraction job is completed. This eliminates polling and speeds up your automation pipeline (Zapier/Make).

How to use

Add these two parameters to your /jobs request:

  • destination=WEBHOOK
  • webhookUrl=https://your-server.com/callback
Example Webhook Payload
{
  "jobId": "cmnqc...",
  "status": "COMPLETED",
  "data": {
    "fields": [...],
    "tables": [...]
  }
}

Error Codes s

CodeMessageSolution
401UnauthorizedAPI key is missing, invalid, or revoked.
403ForbiddenYour plan does not include API access. Upgrade required.
402Payment RequiredInsufficient credit balance. Top up your wallet.
429Too Many RequestsYou have exceeded your plan's rate limits.

© 2026 DocuExtract. All Rights Reserved.