Skip to main content

Error Codes

All API errors return a consistent JSON structure:

{
"code": "VALIDATION_ERROR",
"error": "Missing required field 'externalId'",
"details": {
"field": "externalId",
"constraint": "required"
}
}

HTTP Status Codes

StatusTitleDescriptionRecovery
400Bad RequestThe request body is invalid or missing required fieldsCheck the request body against the API schema. Ensure all required fields are present and correctly typed.
401UnauthorizedThe API key is missing, invalid, or expiredVerify your API key is correct and active. Check that the Authorization header uses the Bearer prefix.
403ForbiddenThe API key doesn't have permission for this operationCheck that your API key has the required scope. Sandbox keys cannot access production endpoints.
404Not FoundThe requested resource doesn't existVerify the resource ID is correct. The verification may have been deleted or belong to a different tenant.
409ConflictThe request conflicts with the current resource stateCheck the verification status. Some operations are only valid in certain states (e.g., document upload requires pending status).
429Rate LimitedToo many requests — you've exceeded the rate limitImplement exponential backoff. Check the Retry-After header for when to retry. See Rate Limits.
500Internal Server ErrorAn unexpected error occurred on the serverRetry the request with exponential backoff. If the error persists, contact support.

Error Codes

CodeDescriptionExample messageHTTP Status
VALIDATION_ERRORRequest body validation failedMissing required field 'externalId'400
VERIFICATION_NOT_FOUNDVerification does not existNo verification found with ID 'ver_xyz'404
INVALID_STATEOperation not valid in current stateCannot upload selfie before document409
RATE_LIMIT_EXCEEDEDToo many requestsMaximum verification attempts exceeded for today429
DOCUMENT_REQUIREDDocument must be uploaded firstDocument must be uploaded before selfie400
SESSION_EXPIREDVerification session has expiredVerification session expired after 24 hours409
DUPLICATE_DETECTEDDuplicate document or image detectedDuplicate document image detected409
TENANT_NOT_FOUNDTenant ID is invalidNo tenant found with the provided ID401

Common error scenarios

Missing X-Tenant-ID header

{
"error": "X-Tenant-ID header is required"
}

Fix: Add the X-Tenant-ID header with your tenant UUID to every request.

Invalid verification ID

{
"error": "invalid verification ID"
}

Fix: Ensure the verification ID is a valid UUID. Verification IDs are returned when you create a session.

Wrong verification state

{
"code": "INVALID_STATE",
"error": "Cannot upload selfie before document"
}

Fix: Follow the verification flow in order: create → document → selfie → complete. Check the current status with GET /verifications/{id}.

Invalid image type

{
"error": "invalid image type: photo"
}

Fix: Use one of the valid image types: document_front, document_back, selfie, liveness_frame.

Best practices

  • Retry with backoff — For 429 and 5xx errors, implement exponential backoff starting at 1 second
  • Check status before operations — Call GET /verifications/{id} to check the current state before performing actions
  • Handle idempotently — Use the externalId to track verifications. Re-creating with the same externalId is safe.
  • Validate webhook signatures — Always verify the HMAC-SHA256 signature before processing webhook payloads
  • Use sandbox for testing — Use test-approve-*, test-reject-*, etc. as external IDs in sandbox for deterministic results