ID Verification (Document Front/Back)
ID Verification
ID Verification (Document Front/Back)
Verify identity document (front and optional back), extract MRZ and data, get Approved or Declined in a single API call β in the gu1 KYC API for identity.
POST
ID Verification (Document Front/Back)
Overview
ID Verification is a Gu1 verification service that validates an identity document by sending the front image (required) and optionally the back image (for two-sided documents such as national IDs). The API returns Approved or Declined, plus extracted data (name, document number, date of birth, address, MRZ, etc.) and optional warnings. No hosted session is involvedβyou send the images and get the result in one call.When to use which
- Session-based KYC (
POST /api/kyc/validations): Full flow with hosted URL, live selfie, liveness, and document capture. Best for onboarding and regulated flows. - Face Match (
POST /api/kyc/face-match): Compare two images (document portrait + selfie) to verify they are the same person; returns match + score. - ID Verification (
POST /api/kyc/id-verification): Send document front (and optional back); get document validation, extracted data (MRZ, name, address, etc.), and Approved/Declined. Best when you already have document images and need extraction + validation only.
Prerequisites
Before using ID Verification:- ID Verification integration enabled: Your organization must have the ID Verification KYC integration activated (e.g. in Marketplace / Integrations).
- Credentials configured: The API key for the ID Verification integration must be set in your organizationβs KYC settings (configured by the Gu1 administrator). Only the API key is required (no webhook secret for this endpoint).
ID Verification is a Gu1 service. All verification is performed by Gu1 infrastructure.
Request
Endpoint
Content-Type
Onlymultipart/form-data is accepted. You can send images in either of two ways (or mix):
- As file parts: attach image/files to the form fields
documentFrontand (optional)documentBack. - As base64 strings: send the same field names with base64-encoded image strings (with or without
data:image/...;base64,prefix).
Headers
Content-Type manually when using FormData; the client will set it with the correct boundary.
If your account uses organization scoping, include:
Form Fields
Front image of the identity document. Send as a file part (recommended) or as a string (base64, with or without
data:image/...;base64, prefix). Formats: JPEG, PNG, WebP, TIFF, PDF. Max 5MB.Back image of the document (optional; required for two-sided documents such as national IDs). Same as
documentFront: file part or base64 string.Optional UUID of the person entity to associate with this check. Used for audit and for listing verifications by entity.
Optional reference (e.g. your user ID) for tracking. Stored with the audit record.
When
true, after document verification is approved, runs RENAPER data check (DNI + gender + trΓ‘mite from OCR vs renaper/data). Requires org RENAPER credentials. Query overrides body.Same as query param
doubleCheckRenaper.Whether to perform document liveness (detect screen/copy). Default
false. Send as string "true" or "false" in form.Minimum age (1β120); users below are Declined. Optional. Send as string in form.
"NO_ACTION" or "DECLINE" when expiration date is not detected. Optional."NO_ACTION" or "DECLINE" when MRZ is invalid or unreadable. Optional."NO_ACTION" or "DECLINE" when visual zone data does not match MRZ. Optional.Response
Success Response (200 OK)
If RENAPER double-check fails after OCR approval,
status becomes "declined" and RENAPER codes are added to warnings.
extractedData fields
The following fields are returned inextractedData and stored on id_verification_verifications.extracted_data (list/get audit endpoints). Empty fields are omitted.
Identity and document (common):
Supplementary (nested; may be empty):
Promoted fields vs. extension bucket
- Common keys (
taxNumber,firstSurname,secondSurname,firstIssueDate,ejemplar, etc.) are promoted to the top level ofextractedDatawhen OCR returns them. - Any other document keys stay in
extractedData.extraFields(same object on POST and audit list/get).
Not included in API responses or audit JSON
- Temporary external image URLs from the verification pipeline β use stored document images (
document-front-image/document-back-image) for images Gu1 saved from your upload. - Full raw verification response body (not exposed in production APIs).
Example Request
Error Responses
Common error codes:Audit and Listing Verifications
Every ID Verification request (success or failure) is stored inid_verification_verifications for audit and compliance. The response includes verificationId (the audit record ID) when persistence succeeds. All endpoints below are part of the Gu1 API.
Get a Single Verification
id β UUID of the verification (from the POST response verificationId or from the list).
Response (200): Same shape as one item in the list: id, organizationId, entityId, status, requestId, vendorData, errorMessage, warnings, extractedData, createdAt, documentFrontStoragePath, documentBackStoragePath, storageProvider, etc.404 if not found or not in your organization.
List Audit Records
Response:
{ "verifications": [ ... ], "pagination": { "limit", "offset", "total" } }. Each verification includes id, entityId, status, requestId, extractedData, warnings, errorMessage, createdAt, and storage paths when images were stored.
Get Stored Document Images
If the verification has stored images (documentFrontStoragePath / documentBackStoragePath), you can stream them with:
id β UUID of the verification. Response: Image bytes (e.g. Content-Type: image/jpeg). 404 if the verification does not exist or that side was not stored.
Coexistence with Other KYC Flows
- Session flow creates a
kyc_validationsrecord and uses a hosted URL; the stored decision can include document, liveness, and face match from the live session. - Face Match compares document portrait + selfie and returns match + score; audit in
face_match_verifications. - ID Verification validates the document (front/back), extracts data, and returns Approved/Declined; audit in
id_verification_verifications. It does not create akyc_validationsrecord. Use it when you need document-only validation and extraction without a hosted session.
Next Steps
Face Match (Document + Selfie)
Compare document photo and selfie
Create KYC Validation
Session-based verification with hosted URL