Skip to main content
POST
Document Verification
The Document Verification endpoint extracts identity details from a photo of a document using OCR. Unlike the checks under Data Verification, which look up an ID number against a government database, this endpoint reads the details directly off an uploaded image — useful as a fallback when a number-lookup check is unavailable, or when your flow already collects a document photo. No face match, no liveness check — this endpoint only performs OCR extraction.

Supported Documents

Which document_type values are valid depends on the document’s country. passport is the only type valid across every supported country. All other types are specific to the country listed. Kenya’s national ID uses its own value, kenya_id — it is not interchangeable with national_id, which is Nigeria’s NIN slip/card.
document_front and document_back are optional per document type — recommended for two-sided documents (national_id, kenya_id, drivers_license), where extraction may be less complete with only the front supplied.

Endpoint

Request

Headers

Body Parameters

Example

Response

200 OK

Not every field is present on every document type — cac_certificate and utility_bill never populate photo, and fields that genuinely aren’t visible or present on the document (e.g. gender on some documents) come back absent rather than guessed.

400 Bad Request

Returned for invalid input (unsupported document_type/country, wrong file type, file too large) or when the document itself fails OCR’s own quality checks (blurry, wrong document type, glare, etc.) — message carries the specific reason in either case.

401 Unauthorized

Returned when the x-access-token header is missing or invalid.
For a full list of error codes, see the Error Codes reference.

Authorizations

x-access-token
string
header
required

Your Adhere API secret key

Body

multipart/form-data
document_type
enum<string>
required

The kind of document being submitted. Which values are valid depends on country — passport works for every supported country; the rest are country-specific.

Available options:
national_id,
passport,
drivers_license,
voters_card,
kenya_id,
cac_certificate,
utility_bill
Example:

"passport"

country
enum<string>
required

Country the document was issued in.

Available options:
nigeria,
kenya,
ghana,
canada,
usa,
cote d'ivoire
Example:

"nigeria"

document_front
file
required

Front of the document. JPG or PNG, max 5MB.

document_back
file

Back of the document. Optional for every type, but recommended for two-sided documents (national_id, kenya_id, drivers_license) — extraction may be less complete without it.

Response

Document details extracted successfully