Errors
Every error, from any endpoint, uses one envelope and a non-2xx status:
{ "error": { "type": "invalid_request_error", "code": "unsupported_type", "message": "Legacy .doc/.xls/.ppt files are not supported yet. Save as .docx/.xlsx/.pptx or PDF.", "doc_url": "https://docs.deskew.dev/errors#legacy_office_unsupported" }}| Field | Meaning |
|---|---|
type |
The family: authentication_error, permission_error, invalid_request_error, document_error, rate_limit_error, billing_error, processing_error, api_error |
code |
Stable machine-readable code. Branch on this, never on message |
message |
Human-readable explanation, may change |
doc_url |
Link to the matching section on this page |
param |
Present on validation_error and missing_file: the offending parameter |
Some responses add headers: Retry-After on 429, Idempotent-Replayed on replays, and X-Request-Id on everything. Quote the request id when contacting support; it matches the row in Request logs.
A failed job carries the same {type, code, message} object in its error field, and in the data.error of a job.failed webhook.
Authentication (401)
Section titled “Authentication (401)”missing_api_key
Section titled “missing_api_key”No Authorization: Bearer … or X-Api-Key header. Send the key; see Authentication.
invalid_api_key
Section titled “invalid_api_key”The key does not have a Deskew prefix or does not match any project. Check for truncation and whitespace; copy the key again from the dashboard.
key_revoked
Section titled “key_revoked”The key was revoked in the dashboard. Create a new one.
key_expired
Section titled “key_expired”The key passed its expiry date, or it is the old key of a roll and the 24-hour overlap is over. Switch to the new key.
Permission (403)
Section titled “Permission (403)”ip_not_allowed
Section titled “ip_not_allowed”The request came from an address outside the key’s IP allowlist. Add the address or CIDR under API keys → Restrict IPs, or call from an allowed host. Behind a proxy, make sure X-Forwarded-For carries the real client address.
insufficient_scope
Section titled “insufficient_scope”The key lacks the scope the endpoint needs (the message names it). Create a key with the right scopes; scopes cannot be edited on an existing key.
email_not_verified
Section titled “email_not_verified”The account’s email address has not been verified, so the dashboard action is blocked. Click the link in the verification email or request a new one from the banner. Dashboard only; the public API does not return this code.
Rate limits and caps (429)
Section titled “Rate limits and caps (429)”rate_limited
Section titled “rate_limited”More requests per minute than the plan allows for this key. Wait Retry-After seconds and retry with backoff. Limits are in Rate limits and quotas.
test_daily_cap
Section titled “test_daily_cap”The test key has used its 50 pages for today (UTC), or this request alone would exceed it. Use another test key, wait for the next day, or use a live key.
Billing (402)
Section titled “Billing (402)”quota_exceeded
Section titled “quota_exceeded”On Free, the request would exceed the 1,000 included pages this cycle. On paid plans, it would push the projected bill over the organization’s spend cap. Upgrade, raise the cap under Usage and billing, or wait for the next cycle.
Request validation (422 / 415 / 413)
Section titled “Request validation (422 / 415 / 413)”validation_error
Section titled “validation_error”A parameter has the wrong type or value; param names it and message says what was expected. Typical causes: output not one of markdown|json|text, quality not one of auto|fast|accurate|premium, mode not one of auto|sync|async, a JSON body without url, or a schema body whose json_schema.type is not object.
missing_file
Section titled “missing_file”POST /v1/extract received neither a multipart file nor a url. Send one of them.
empty_file
Section titled “empty_file”The uploaded file (or the body fetched from url) has zero bytes.
unsupported_type
Section titled “unsupported_type”The bytes are not a format Deskew reads (for example a ZIP archive or an unknown binary). Supported: PDF, DOCX, XLSX/XLSM, CSV/TSV, PPTX, PNG, JPEG, TIFF, WebP, BMP, GIF, HEIC/HEIF, EML, MSG, HTML, TXT. Status 415.
legacy_office_unsupported
Section titled “legacy_office_unsupported”A binary .doc, .xls or .ppt file. Save it as .docx / .xlsx / .pptx or export to PDF. Status 415.
file_too_large
Section titled “file_too_large”The upload or URL body is over 500 MB. Split the document. Status 413.
sync_limit_exceeded
Section titled “sync_limit_exceeded”You sent mode=sync for a document that is not eligible for a synchronous run (more than 12 work units or over 20 MB). Drop mode or use mode=async and poll the job. Status 413.
invalid_url
Section titled “invalid_url”url does not start with http:// or https://.
url_fetch_failed
Section titled “url_fetch_failed”The URL could not be fetched: the server answered 4xx/5xx, timed out (30 s), redirected more than five times, or the connection failed. Make sure the file is publicly reachable or upload it directly.
Document problems (422)
Section titled “Document problems (422)”These are type: "document_error". For a synchronous request they are the HTTP response; for a background job they appear in the job’s error.
password_protected
Section titled “password_protected”The PDF is encrypted and no password, or the wrong one, was given. Send it as pdf_password (form field) or options.pdf_password (JSON).
corrupt_file
Section titled “corrupt_file”The file could not be opened by its parser: a damaged PDF, an image that will not decode, a broken XLSX or PPTX. Re-export the file from its source application.
empty_document
Section titled “empty_document”The PDF has no pages, or the workbook has no sheets.
too_many_pages
Section titled “too_many_pages”The PDF has more than 2,000 pages. Split it.
Jobs (404 / 409 / 410)
Section titled “Jobs (404 / 409 / 410)”job_not_found
Section titled “job_not_found”No job with that id in this key’s project and mode. Check the id, and remember test keys cannot see live jobs and vice versa. Status 404.
result_not_ready
Section titled “result_not_ready”The job is not completed yet (the message gives the current status). Poll GET /v1/jobs/:id until it is, or wait for the webhook. Status 409.
result_expired
Section titled “result_expired”The job completed more than 24 hours ago and its result has been deleted. Submit the document again. Status 410.
idempotency_conflict
Section titled “idempotency_conflict”The Idempotency-Key was already used within the last 24 hours with a different file or different options. Use a new key for a new request. Status 409. See Idempotency.
Processing (5xx)
Section titled “Processing (5xx)”engine_unavailable
Section titled “engine_unavailable”An OCR or premium engine could not be reached or rejected its credentials. The page is retried on the tier-1 engine where possible; if every path fails, the request or job fails with this code. Retry later. Status 503.
engine_error
Section titled “engine_error”An engine rejected the page or returned an unusable response after retries. Usually a single unreadable page; check pages.failed and warnings[]. Status 500.
processing_failed
Section titled “processing_failed”Something unexpected failed and no pages could be produced. The request id is in X-Request-Id; retry, and contact support with the id if it persists. Status 500.
Generic codes
Section titled “Generic codes”You may also see not_found (unknown path or resource, 404), method_not_allowed (405), unauthorized / forbidden for framework-level auth failures, and http_error for anything else mapped from an HTTP exception. They use the same envelope.