Errors

Error Codes

DocuShell returns structured JSON errors with stable codes and request IDs so integrations can distinguish validation problems, auth failures, rate limits, and transient capacity issues.

Errors5 min
View as Markdown

Section

Error Envelope

Rate limit response

json

{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Too many requests. Please retry later.",
    "type": "rate_limit_error",
    "request_id": "req_01JX8Y62XCDNZ2BM7TBM2M9Q8E"
  }
}

Section

Common Status Codes

HTTPCodeMeaning
400invalid_requestMalformed JSON, missing required fields, unsupported file type, invalid URL, or rejected PDF.
401invalid_api_keyMissing, revoked, expired, or malformed bearer credential.
403api_access_disabled / webhook_access_disabledCredential is valid, but the current plan state does not allow the API lane or requested webhook fields.
402insufficient_creditsThe account cannot start the requested job because credits or plan access are insufficient. The error includes hard-limit and upgrade details.
409idempotency_key_reusedThe same idempotency key was reused with a different payload.
413payload_too_largeThe request body or uploaded file exceeds the plan or endpoint limit.
429rate_limit_exceededThe caller exceeded the configured request rate.
500internal_errorUnexpected gateway or service failure.
503backend_unavailableA downstream processor or queue was temporarily unavailable.

Section

Recovery Guidance

  • Retry 429, 500, and 503 failures with backoff; keep the same Idempotency-Key only for the exact same submit request.
  • Fix 400 failures before retrying. The same invalid file or request shape will be rejected again.
  • Resolve 401, 403, and 402 in the dashboard before sending more work. DocuShell does not auto-charge overages.
  • Log request_id from the error body or x-request-id header for support and debugging.