API access

Submit documents programmatically. Use your secret token to authenticate every request.

Your API token

Treat this like a password. Anyone with this token can submit documents on your behalf.

POSTSubmit by file upload

Send a PDF file as multipart form data. The document is queued immediately and the response includes its ID.

POSThttp://localhost:5002/api/v1/documents/upload

Headers

Authorization
Bearer {}your_api_token}
Content-Type
multipart/form-data

Form fields

file (required)
The PDF file to process. Max 25 MB.

Example request

curl -X POST http://localhost:5002/api/v1/documents/upload \
  -H "Authorization: Bearer sk_live_4f8a...abc123" \
  -F "file=@./sample-document.pdf"

Example response · 201 Created

{
  "success": true,
  "data": {
    "documentId": "Iox4_g6lHFU0QiLROwwyX",
    "jobId": "VYD4RsZBgLKs0R_Wy149A",
    "status": "pending"
  }
}

POSTSubmit by file URL

Pass a publicly-reachable PDF URL. We fetch the file ourselves, then process it.

POSThttp://localhost:5002/api/v1/documents/from-url

Headers

Authorization
Bearer {}your_api_token}
Content-Type
application/json

Body

url (required)
Absolute https:// URL to a PDF file. Must be reachable from our network.

Example request

curl -X POST http://localhost:5002/api/v1/documents/from-url \
  -H "Authorization: Bearer sk_live_4f8a...abc123" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://files.acme.com/documents/sample-7841.pdf" }'

Example response · 202 Accepted

{
  "success": true,
  "data": {
    "documentId": "Iox4_g6lHFU0QiLROwwyX",
    "jobId": "VYD4RsZBgLKs0R_Wy149A",
    "status": "pending",
    "source": "api_url",
    "sourceUrl": "https://files.acme.com/documents/sample-7841.pdf"
  }
}

GETFetch document status

Poll the status & extracted JSON of a document you previously submitted. You'll also receive this payload via webhook once processing finishes — polling is optional.

GEThttp://localhost:5002/api/v1/documents/{id}

Example request

curl http://localhost:5002/api/v1/documents/127 \
  -H "Authorization: Bearer sk_live_4f8a...abc123"

Example response · 200 OK

{
  "id": 127,
  "status": "auto_approved",
  "confidence": 0.92,
  "extracted": {
    "_meta": {
      "page_count": 2,
      "extraction_method": "text",
      "raw_text_chars": 6114,
      "confidence": 0.92
    }
  },
  "processed_at": "2026-05-26T08:33:02Z"
}