Errors
The error shape, the codes the API returns, and what to do about each.
Early access
The REST API, webhooks and embedded signing are open to accounts in early access. If Settings, Developers is not in your account yet, write to contact@docudetect.com. What these pages describe can still change; breaking changes are announced on this site first.
Every failure answers with the HTTP status and this body:
{ "success": false, "status": 409, "message": "This document changed since you read it.", "code": "conflict" }Branch on status and code. Show message to people if you like; don't parse it.
Codes
| Status | Code | What to do |
|---|---|---|
| 400 | invalid_request | The body, query or path is wrong. The message names what. Fix it and retry. |
| 401 | invalid_api_key | The key is missing, unknown, expired or revoked. |
| 403 | insufficient_scope | The key lacks the permission the operation needs. Make a key with it. |
| 403 | account_suspended | The account can't use the API. Contact us. |
| 403 | forbidden | Not allowed for this account. |
| 403 | embedding_disabled | Embedded signing is off, or the origin isn't a verified domain. See Embedded signing. |
| 403 | limit_<name> | A plan limit is reached, for example limit_apiKeys. Upgrade, or remove something you no longer use. |
| 403 | email_unverified | The account's email is not verified, so nothing can be emailed. |
| 403 | held_for_review | The send was held for review because the title looks like a scam. Nothing was emailed. |
| 404 | not_found | No such document, template or endpoint in this account. |
| 409 | conflict | Not possible in the document's current state, or it changed meanwhile. Read it again. |
| 409 | several_signers | The operation is for one-signer documents only. |
| 409 | template_not_ready | The template can't make documents yet. Finish it in the app. |
| 409 | idempotency_in_progress | A call with the same Idempotency-Key is still running. Wait for Retry-After. |
| 409 | idempotency_replay_unavailable | The first call's answer can't be replayed. Read the document before acting again. |
| 413 | too_large | The body or the PDF is too large. |
| 422 | idempotency_mismatch | The Idempotency-Key was used with a different body. Use a new key for a different call. |
| 429 | rate_limited | Too many calls. Wait Retry-After seconds. |
| 429 | new_account_limit | A new account reached its daily invitations. Wait Retry-After seconds. |
| 429 | email_limit | The account's daily email limit is reached. |
| 500 | internal | Something failed on our side. Retry with the same Idempotency-Key. |
| 503 | unavailable | A service we depend on is down for a moment. Retry with the same Idempotency-Key. |
Every 429 carries a Retry-After header in seconds. Each operation's own errors are listed in the reference.
Sends the account checks refuse
Sending, reminding and anything else that emails someone go through the same checks as the app. A refused send changes nothing and emails nobody; its code says why (email_unverified, new_account_limit, held_for_review, account_suspended). On documents with several signers, a refusal for one person is reported on that signer as emailRefused in the Signer object.