Skip to main content
POST
Document Verification — Global Passport
Verify a customer’s passport from any country by uploading a photo of the data page. We read the details, confirm which country issued the passport, and compare the face on the passport with a selfie.
Passport is single-sided. Only document_front is needed.
country is optional. Send it when you know which country issued the passport. Leave it out and we detect the country from the passport itself.

Endpoint

Request

Headers

Body Parameters

A scanned document can be uploaded as a single-page PDF, for example -F "document_front=@/path/to/scan.pdf".

Example

Response

200 OK

Face match: verified: false with decision: "NO_MATCH" means the comparison ran and the faces didn’t match. verified: null with a reason means the comparison couldn’t run, for example because no face was found in the selfie. A face-match problem never blocks the passport data: the rest of data is still returned.

400 Bad Request

The passport wasn’t issued by the country you sent:
Passports from this country can’t be verified:
The photo can’t be read, for example because part of the passport is cut off:

Expired passports

An expired passport fails the check. The extracted details are still returned in data, with is_expired: true:

401 Unauthorized

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_front
file
required

Photo or scan of the passport data page. JPG, PNG or single-page PDF, max 10MB.

selfie_image
file
required

A selfie to compare against the face on the passport. JPG or PNG, max 5MB.

country
string

Optional. The country that issued the passport, as an two-letter country code. Leave it out to have it detected.

Example:

"RW"

Response

Document details extracted successfully

status
string
Example:

"success"

data
object
message
string
Example:

"Document details retrieved successfully"