Errors
Every error is JSON with a stable code and a message for people. A call that fails is never billed.
The shape
{"error": {"code": "invalid_key", "message": "That API key is not valid."}}
Branch on code, not on message: a code never changes meaning or disappears within /v1, while a message may be reworded.
Every code
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request could not be read, such as a missing parameter. |
| 400 | invalid_domain | domain must be a hostname like example.com (Email-security grade) |
| 400 | invalid_selector | selector must be letters, digits, hyphens, underscores or dots (Email-security grade) |
| 400 | not_pdf | Send the PDF file as the request body. (PDF/UA validator) |
| 400 | invalid_profile | profile must be ua1, ua2 or auto (PDF/UA validator) |
| 401 | missing_key | Send your API key in the X-API-Key header. |
| 401 | invalid_key | That API key is not valid, or it was revoked. |
| 402 | payment_required | The key's org has no card on file. |
| 402 | account_suspended | A payment failed or the card was removed. |
| 404 | not_found | No such endpoint. |
| 405 | method_not_allowed | Wrong HTTP method for the endpoint. |
| 410 | moved | The endpoint moved to another product; the message says where. |
| 413 | file_too_large | The body is larger than 50 MB. (PDF/UA validator) |
| 415 | unsupported_media_type | Unsupported Content-Type. |
| 422 | unreadable_pdf | The file could not be read as a PDF. (PDF/UA validator) |
| 429 | rate_limited | More than 10 requests a second on one key. |
| 429 | quota_exceeded | The key's monthly safety limit of 1,000,000 calls is used up. |
| 500 | internal | Something failed on our side. Retry, and tell us if it keeps happening. |
| 502 | dns_failed | DNS lookup failed; try again shortly. (Email-security grade) |
| 504 | timeout | Validation took longer than 60 seconds. (PDF/UA validator) |
NextVersioning