Credential types: CNH digital (Carteira Nacional de Habilitação) and CIN digital (Carteira de Identidade Nacional)
Delivery: PDF upload through SDK or the /omni/add/front-id/v2 call.
Brazilian digital IDs are issued by state authorities and downloaded by the holder as a PDF from a gov.br app: the Carteira Digital de Trânsito app for CNH, the gov.br app for CIN. The citizen hands the PDF to your flow, and you post it to the Incode API as a base64-encoded file.
Users can upload Brazil's digital driver's license (CNH-e) and digital national ID (CIN) as a PDF during the ID Capture step. To trust the document, pair the upload with SERPRO validation. The PDF gives you the data; SERPRO, the Brazilian government's data service, confirms the data and the face are real.
CNH is issued by the state DETRANs under SENATRAN. CIN is issued by the state identification institutes under the federal government. Both are accepted from all 27 states.
How to enable it
- Turn on digital ID upload in ID Capture module. In the flow builder in Dashboard, open the ID Capture module configuration and enable Allow digital ID upload. Users then see the option to upload a PDF.
- Add SERPRO validation. Add the Government Record Verification module to the flow. In the module configuration, select Brazil under Validation countries, then enable both Data validation and Facial validation. Incode sends the document data and the user's selfie to SERPRO, and SERPRO returns the result. If you don't see the Brazil options, contact your Incode representative.
- Test with a real PDF. Use a PDF exported from the government app, not a screenshot. Real files are under 1 MB. The upload limit is 5 MB.
Available documents
| Document | Template | Status |
|---|---|---|
| CNH digital (2020) | BRA|ALL|DriversLicense|DIGITAL_DRIVERS_LICENSE_PDF|2020 |
Supported |
| CNH digital (2021) | BRA|ALL|DriversLicense|DIGITAL_DRIVERS_LICENSE_PDF|2021 |
Supported |
| CIN digital (2024) | BRA|ALL|FederalID|DIGITAL_IDENTIFICATION_CARD_PDF|2024 |
Supported |
| CIN digital (2025) | BRA|ALL|FederalID|DIGITAL_IDENTIFICATION_CARD_PDF|2025 |
Supported |
| CIN digital (2026) | BRA|ALL|FederalID|DIGITAL_IDENTIFICATION_CARD_PDF|2026 |
Coming soon |
Classification is automatic. The service treats the upload as a digital ID when it classifies as one of the templates in the table above. A photo of a physical card, or any non-digital document, fails with DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED.
Integration flow
POST /omni/startto create the session.POST /omni/add/front-id/v2?idType=DigitalId&onlyFront=trueto upload the PDF.POST /omni/process/idto run OCR and ID validation.POST /omni/add/face-third-partyto add a selfie, if Face Match or SERPRO facial validation is used.POST /omni/process/government-validationto run SERPRO validation, when enabled for the flow.GET /omni/get/ocr-data/v2andGET /omni/get/scoreto fetch results.
API Integration: Sending the PDF
idType=DigitalId is required on the /omni/add/front-id/v2 call. It tells the service to treat the upload as a digital document rather than a camera capture, and it enables PDF acceptance.
| Endpoint | Body | PDF accepted | Notes |
|---|---|---|---|
POST /omni/add/front-id/v2 |
JSON base64Image or imageUrl |
Yes | Recommended. .pdf imageUrl allowed only with idType=DigitalId |
POST /omni/add/back-id/v2 |
JSON base64Image or imageUrl |
Base64 only | Not needed for digital IDs: send front with onlyFront=true |
POST /omni/add/front-id (v1) |
Raw bytes | Yes | Legacy |
| Encrypted and second-ID endpoints | Any | No | PDF conversion not supported on these paths |
Only the first page of the PDF is rendered to JPEG and processed. PDFs are detected from the file signature, not the extension.
If your ID Capture configuration restricts uploaded file formats (uploadedFileSubmissionFormats), pdf must be in that list, otherwise the request returns 400 Incorrect image format for uploaded file.
Request example
curl -X POST "https://<host>/omni/add/front-id/v2?idType=DigitalId&onlyFront=true" \
-H "X-Incode-Hardware-Id: <session token>" \
-H "x-api-key: <api key>" \
-H "api-version: 1.0" \
-H "Content-Type: application/json" \
-d '{"base64Image": "<base64 of the PDF>"}'
Extracted attributes
Attributes are returned via GET /omni/get/ocr-data/v2 under the ocrData object. Two fields identify the credential:
documentSubmissionMethodis alwaysIMPORTED_CREDENTIALfor digital ID sessions.- The matched template, shown in the Available documents table above, identifies the specific document type.
CNH digital
| Attribute | ocrData field |
Notes |
|---|---|---|
| Full name | name |
|
| Mother's name | mothersName |
|
| Father's name | fathersName |
|
| Place of birth | birthPlace |
CNH 2020 only |
| Date of birth | birthDate |
|
| Issue date | issueDate |
|
| Expiry date | expirationDate |
|
| Issuing authority | issuingAuthority |
|
| License number | documentNumber |
|
| Registration number | refNumber |
|
| CPF | personalNumber |
|
| Driving classes | classes |
|
| Issuing state | state |
CIN digital
| Attribute | ocrData field |
Notes |
|---|---|---|
| Full name | name |
|
| Mother's name | mothersName |
|
| Father's name | fathersName |
|
| Nationality | nationality |
CIN 2025 and later |
| Gender | gender |
CIN 2025 and later |
| Place of birth | birthPlace |
|
| Date of birth | birthDate |
|
| Expiry date | expirationDate |
CIN 2025 and later |
| Issue date | issueDate |
|
| Issuing authority | issuingAuthority |
|
| Document number | documentNumber |
|
| CPF | personalNumber |
CIN 2024 only |
| Issuing state | state |
|
| MRZ lines | mrz1, mrz2, mrz3 |
CIN 2025 only |
GovMatch with SERPRO
Run POST /omni/process/government-validation to validate the holder against the Brazilian federal records service (SERPRO). See the Brazil GovMatch documentation for more information on this. Two modes are configurable per flow:
- Data and face validation: Same data plus the selfie, compared to the SERPRO biometric base. This is recommended as higher assurance verification method.
- Data validation (Datavalid basic): Sends CPF, full name, birth date, nationality, and the collected address to SERPRO.
Fields reported as validated in the response: documentNumber (CPF found at SERPRO), first name, paternal and maternal last name, and birth date.
Results
| Condition | Status |
|---|---|
| CPF not found at SERPRO | USER_NOT_FOUND |
| Face mode, no face in the SERPRO base, CNH document | USER_NOT_FOUND |
| Face mode, no face in the SERPRO base, CIN document | Passes on data only |
| Missing CPF on the request | CPF_NUMBER_INVALID_OR_MISSING |
| Missing selfie in face mode | MISSING_SELFIE |
Availability
| Channel | Available |
|---|---|
| Web SDK | Yes |
| Native SDKs (iOS, Android) | Yes |
| Web hosted flows | Yes |
| API | Yes |
SERPRO validation is available to tenants provisioned for Brazil. Contact your Incode representative to enable it for your flow.
Current limits
- The QR code on the PDF is not validated against SERPRO today. The integration contract will not change when this lands.
- Only the first page of the PDF is processed.
- The PDF is not checked for an embedded digital signature. Authenticity relies on template classification, ID validation checks, and SERPRO.
- Encrypted and second-ID endpoints do not accept PDFs.