Documents
Upload document
Upload a new document for processing. Supports PDF files and
Upload document
cURL
curl -X POST "https://api.handwritingocr.com/v3/documents" \
-H "Authorization: Bearer your-api-token" \
-H "Accept: application/json" \
-F "file=@/path/to/document.pdf" \
-F "action=transcribe" \
-F "delete_after=604800" {
"id": "abc123",
"status": "queued"
} Upload a new document for processing. Supports PDF files and various image formats. The API checks the page count of the submitted document against your credit balance before queueing for processing.
Headers
- Authorization string required header
Bearer your-api-token - Accept string required header
application/json - Content-Type string required header
multipart/form-data
Body parameters
- action string required body
What to do with the document.
transcribeextracts text,tablesextracts table structure,extractorruns a Custom Extractor. - file file required body
The document to process. Valid file types are PDF, JPG, PNG, TIFF, HEIC, GIF. Maximum file size is 20MB.
- delete_after integer body
Seconds until auto-deletion. Overrides the auto-deletion period set in your user settings. Minimum 300 seconds, maximum 1209600 seconds (14 days).
- extractor_id string body
A 10-character alphanumeric string e.g.
Ks08XVPyMd. Create and test an extractor in the dashboard to get the extractor ID. Required whenactionisextractor. - webhook_url string body
A webhook URL to send the results for this request. Overrides your global webhook URL.
Response codes
HTTP status- 201
Document created and queued for processing.
- 400
Bad Request — missing required fields.
- 401
Unauthorized — invalid or missing API token.
- 403
Forbidden — insufficient page credits.
- 415
Unsupported Media Type.
- 422
Validation Error — invalid parameters.
- 429
Too many requests — rate limited.
- 500
Server Error — file storage or processing failed.