API documentation
Documents
Upload, list, inspect, delete, and download previews for documents.
Upload a document
POST /api/v1/documents accepts multipart form data and returns a document resource you can poll until processing is complete.
curl -sS -X POST "https://www.exdata.app/api/v1/documents" \
-H "Authorization: Bearer $EXDATA_API_TOKEN" \
-H "Idempotency-Key: invoice-upload-001" \
-F "file=@./invoice.pdf" \
-F "locale=en" \
-F "custom_types[]=invoice"
Upload fields
Send the file and any context your workflow already knows. Keep hints short and factual; they help classification without replacing extraction from the document itself.
| Field | Required | Type | Description |
|---|---|---|---|
file |
Yes | File | Document file, up to 500 MB. |
text |
No | String | Additional text or context to attach to the document. |
custom_types[] |
No | Array | Optional type extensions for your workflow. exdata already supports standard types: invoice, credit-note, reminder, salary-statement, bank-statement, contract, balance-sheet, tax-assessment-note, timesheet, letter, and other. Add custom values only when your integration needs extra document categories. |
requester |
No | String | Your integration name, user reference, workflow ID, or request source. |
locale |
No | String | Supported locale such as en or de. |
allow_ai_processing |
No | Boolean | Legacy processing flag. Most integrations omit this field. |
Document object
Document responses include status, processing details, file metadata, and the latest extraction run metadata.
{
"data": {
"id": 123,
"mode": "live",
"status": "pending",
"processing_stage": "queued",
"processing_error": null,
"blocked_reason": null,
"filename": "invoice.pdf",
"file_format": "pdf",
"file_size": 240123,
"locale": "en",
"custom_types": ["invoice"],
"ai_processing": true,
"latest_extraction_run": {
"id": 456,
"mode": "live",
"source": "api",
"status": "pending",
"blocked_reason": null,
"extraction_schema_version": "2026-05-17",
"extractor_version": "document:2026-05-17",
"ai_prompt_version": "document-ai:2026-05-17",
"normalization_version": "base:2026-05-10"
},
"created_at": "2026-05-10T01:00:00.000000Z"
}
}
Endpoint reference
The document endpoints cover upload, status polling, generated previews, deletion, and reading extraction fields after processing completes. See the endpoint reference for parameters, response behavior, and copyable examples for every endpoint.
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/documents |
List account documents with pagination. |
| POST | /api/v1/documents |
Upload a document. |
| GET | /api/v1/documents/{document} |
Fetch current document status and metadata. |
| DELETE | /api/v1/documents/{document} |
Delete a document. |
| GET | /api/v1/documents/{document}/thumbnail |
Download a generated thumbnail. |
| GET | /api/v1/documents/{document}/previews |
List generated preview files. |
| GET | /api/v1/previews/{preview} |
Download a preview file. |
| GET | /api/v1/documents/{document}/extractions |
Read extraction fields after completion. |