Upload Passport V2

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This endpoint is used to upload the photo page of a user's passport or visa for verification. Unlike Upload Passport, the image is sent as a file using multipart/form-data and not as a base64 string.

This is an asynchronous call. It returns a 202 with result as in_progress as soon as the image is saved, and the scan runs in the background. Once the scan is done, the result can be fetched in one of the following ways:

  1. Webhook (recommended): The GOVT_ID_SCAN_STATUS_UPDATE event is sent to all the active webhook URLs of your company. Details on the payload can be checked here.
  2. Status API: Call Check Upload Passport V2 every few seconds until result is no longer in_progress.

If the webhook is not received within a few minutes, call the status API. It always has the latest result.

Before calling this endpoint, the user must be created using Create User and consent must be recorded using User Consent.

Request Body (multipart/form-data)

FieldTypeRequiredNotes
userAccessCodetextYesuserAccessCode of the user.
idFrontfileYesPhoto page of the passport. JPG, JPEG or PNG, 5MB or smaller.

Important Notes:-

  1. This call does not tell you whether the passport passed or not. A 202 only means the image was uploaded successfully and the scan has started.
  2. Only the following formats are accepted:- JPG, JPEG, PNG. PDF files and other image formats will not be accepted.
  3. The maximum allowed size of the image is 5MB.
  4. Only one scan can run at a time for a user. If a scan is already in progress, the call returns a 400.
  5. attempts in the response is the number of scans this user has made on this endpoint.
  6. Only passports and visas are accepted here. Any other document, like a driver's license, will not be verified and returns restricted_doc_type. Please use Upload ID V2 for those.
  7. The image should be of the page with the user's information on it, and it must be clear, well-lit and have minimal glare. To see a sample passport image, please see this link or this one.

Error Responses

StatuserrorCodeWhen
400IDENTITY_PASSPORT_INVALID_IMAGE_UPLOADidFront is missing or is not sent as a file.
400IDENTITY_IMAGE_TOO_LARGEThe image is larger than 5MB.
400IDENTITY_INVALID_IMAGE_FORMATThe image is not a JPG, JPEG or PNG.
400IDENTITY_PASSPORT_ALREADY_COMPLETEDThe passport has already been verified for this user.
400IDENTITY_DOCUMENT_SCAN_IN_PROGRESSA scan is already in progress for this user.
400-userAccessCode is missing or doesn't match any user from your company.
401-The API key is invalid, or consent is not recorded for the user.
Body Params
string
required
file
required

Photo page of the passport. JPG, JPEG or PNG, 5MB or smaller.

Responses

Language
Credentials
Bearer
API KEY
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json