VerifyHQ Docs

Error Handling

VerifyHQ uses conventional HTTP status codes. All errors include a structured JSON response.

Error Format

Error Responsejson
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Front image is required. Please upload a clear photo of the front of your document.",
  "timestamp": "2025-01-15T10:30:00Z"
}

HTTP Status Codes

ParameterTypeDescription
200SuccessRequest succeeded
201CreatedResource created successfully
400Bad RequestInvalid request body or missing required fields
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient permissions for this operation
404Not FoundResource does not exist
409ConflictResource already exists (e.g., active verification)
413Payload Too LargeFile exceeds 10MB limit
422UnprocessableValidation failed (see message for details)
429Rate LimitedToo many requests. Check Retry-After header.
500Server ErrorInternal error. Contact support if persistent.
503UnavailableService temporarily unavailable

Validation Errors

422 Validation Errorjson
{
  "statusCode": 422,
  "error": "Unprocessable Entity",
  "message": [
    "Country code must be uppercase ISO 3166-1 alpha-2 (e.g., US, GB, NG)",
    "Document type must be one of: ID_CARD, PASSPORT, DRIVER_LICENSE, RESIDENCE_PERMIT"
  ]
}
Retry Strategy
For 429 and 503 errors, use the Retry-After header value. For 500 errors, retry with exponential backoff up to 3 times.