Skip to main content

Capture

Upload the document and the biometric capture of a process from your own front end. These endpoints authenticate with the onboarding token.

Gateway can respond to a capture or validation failure with HTTP 200 and code: ERROR (or a nonzero numeric code for identity verification). Check the body as well as the HTTP status. See Error responses.

Authentication. Capture endpoints authenticate with the onboarding token returned by Create onboarding process, sent in the onboarding-token header. The token is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) and is valid for that process only, so it can be handed to your front end without exposing your API credentials.

Start scan process​

POST/mobbscan-agent/scan/start Onboarding token

Starts the scan process of an onboarding process and sends the client information used to configure it.

Request bodymultipart/form-data

  • scanIduuidRequired

    Unique identifier of the scan process, generated when the onboarding process is created.

  • clientVersionstringRequired

    Identifier/version of your own client making the request (required by the gateway). Used for logs and troubleshooting; this is not the version of Gateway Front.

Response200 · application/json

  • codestring

    Result of starting the scan process.

    Values: OKERROR
  • descriptionstring

    Detailed result of starting the scan process.

    Values: START_SCAN_SUCCESSERROR_START_SCAN_FAILED
  • scanIduuid

    Unique identifier of the scan process, generated when the onboarding process is created.

Status codes

  • 200Gateway returns HTTP 200 with this JSON body when the request is processed. Check code: a finished process or a failed scan start can produce ERROR instead of OK.
  • 400A required parameter is absent (such as clientVersion) or a supplied parameter is malformed. An unknown scanId can fail elsewhere in the flow.
  • 401The onboarding token is incorrect or has expired.
  • 500Unexpected error on the server while processing the request.
curl -X POST 'https://{GATEWAY-HOST}/mobbscan-agent/scan/start' \
-H 'onboarding-token: <ONBOARDING_TOKEN>' \
-F 'scanId=41191176-cc2b-433f-9950-685bad58fbbc' \
-F 'clientVersion=integrator-web/1.0.0'
Responses
200OKapplication/json

Gateway returns HTTP 200 with this JSON body when the request is processed. Check code: a finished process or a failed scan start can produce ERROR instead of OK.

{
"code": "OK",
"description": "START_SCAN_SUCCESS",
"scanId": "41191176-cc2b-433f-9950-685bad58fbbc"
}

Scan document​

POST/mobbscan-agent/scan Onboarding token

Scans a document and returns the extracted data and validations. This combined endpoint requires back; front is optional, for example when submitting a passport data page as back. Send both sides for two-sided documents.

Request bodymultipart/form-data

  • scanIduuidRequired

    Unique identifier of the scan process, generated when the onboarding process is created.

  • frontfile· PNG or JPEGOptional

    Front side of the document.

  • backfile· PNG or JPEGRequired

    Back side of the document.

  • isDocumentCroppedbooleanOptional

    Set to true if the images are already cropped to the document. Recommended: leave it false and let the MobbScan server crop the document automatically.

    Default: false

Response200 · application/json

  • codestring

    Result of the scan.

    Values: OKERROR
  • descriptionstring

    Detailed result of the scan.

    Values: SCAN_DOCUMENT_SUCCESSERROR_SCAN_DOCUMENT_FAILED
  • scanIduuid

    Unique identifier of the scan process, generated when the onboarding process is created.

  • documentobject

    Scanned document data. See The document object.

  • clientVersionstring

    Client version sent when the scan process was started.

  • scanProcessValidationResultobject

    Result of the validation matrix. See Validation matrix result.

Status codes

  • 200Gateway can return HTTP 200 with extracted data or with code: ERROR and description; do not treat the scan as successful without checking code.
  • 400A required field is missing or has an invalid format, for example an image that is not PNG or JPEG.
  • 401The onboarding token is incorrect or has expired.
  • 500Unexpected error on the server while processing the request.
curl -X POST 'https://{GATEWAY-HOST}/mobbscan-agent/scan' \
-H 'onboarding-token: <ONBOARDING_TOKEN>' \
-F 'scanId=41191176-cc2b-433f-9950-685bad58fbbc' \
-F 'front=@front.jpg' \
-F 'back=@back.jpg'
Responses
200OKapplication/json

Gateway can return HTTP 200 with extracted data or with code: ERROR and description; do not treat the scan as successful without checking code.

{
"code": "OK",
"description": "SCAN_DOCUMENT_SUCCESS",
"scanId": "41191176-cc2b-433f-9950-685bad58fbbc",
"document": {
"name": "CARMEN",
"surname": "ESPAÑOLA ESPAÑOLA",
"firstSurname": "ESPAÑOLA",
"secondSurname": "ESPAÑOLA",
"gender": "F",
"dateOfBirth": "01/01/1980",
"nationality": "ESP",
"personalNumber": "99999999R",
"parents": "JUAN / CARMEN",
"address": "AVDA DE MADRID S-N",
"city": "MADRID",
"region": "MADRID",
"cityOfBirth": "MADRID",
"regionOfBirth": "MADRID",
"countryOfBirth": "ESPAÑA",
"documentType": "ESPIDCardV3",
"documentNumber": "BAA000431",
"issuingState": "ESP",
"dateOfIssuing": null,
"dateOfExpiry": "01/01/2025",
"mrz": "IDESPBAA000431599999999R<<<<<<8001010F2501018ESP<<<<<<<<<<<6ESPANOLA<ESPANOLA<<CARMEN<<<<<",
"laserMark": null,
"mrzData": {
"dateOfExpiry": "01/01/2025",
"gender": "F",
"nationality": "ESP",
"surname": "ESPANOLA ESPANOLA",
"documentNumber": "BAA000431",
"name": "CARMEN",
"dateOfBirth": "01/01/1980",
"personalNumber": "99999999R"
},
"vizData": {
"dateOfExpiry": "01/01/2025",
"gender": "F",
"nationality": "ESP",
"surname": "ESPAÑOLA ESPAÑOLA",
"documentNumber": "BAA000431",
"name": "CARMEN",
"dateOfBirth": "01/01/1980",
"personalNumber": "99999999R"
},
"validationBothSidesMatch": "VALID",
"validationBothSidesMatchScore": "100",
"validationMRZ": "NOT_VALID",
"validationMRZCheckDocumentNumber": "VALID",
"validationMRZCheckPersonalNumber": "VALID",
"validationMRZCheckDateOfBirth": "NOT_VALID",
"validationMRZCheckDateOfExpiry": "NOT_VALID",
"validationMRZCheckComposite": "VALID",
"validationDocumentNumber": "VALID",
"validationPersonalNumber": "VALID",
"validationMRZNameSurnameSeparator": "VALID",
"validationMRZSurnameSeparator": "VALID",
"validationSex": "VALID",
"validationGender": "VALID",
"validationNationality": "VALID",
"validationDateOfBirth": "VALID",
"validationDateOfExpiry": "VALID",
"validationDocumentNotExpired": "NOT_VALID",
"validationLegalAge": "VALID",
"validationAllowedIssuingState": "NOT_CHECKED",
"validationIssuingState": "VALID",
"validationDateOfIssuing": "NOT_CHECKED",
"validationDatesRelationship": "VALID",
"validationNameBothSidesMatch": "VALID",
"validationSurnameBothSidesMatch": "VALID",
"validationPersonalNumberBothSidesMatch": "VALID",
"validationDocumentNumberBothSidesMatch": "VALID",
"validationDateOfBirthBothSidesMatch": "VALID",
"validationDateOfExpiryBothSidesMatch": "VALID",
"validationSexBothSidesMatch": "VALID",
"validationGenderBothSidesMatch": "VALID",
"validationNationalityBothSidesMatch": "VALID",
"validationPersonalNumberFormat": "VALID",
"validationDocumentNumberFormat": "VALID",
"validationNameNotEmpty": "VALID",
"validationSurnameNotEmpty": "VALID",
"validationNameBothSidesMatchScore": "100",
"validationSurnameBothSidesMatchScore": "100",
"validationFrontAppearance": "NOT_VALID",
"validationFrontAppearanceScore": 0,
"validationBackAppearance": "VALID",
"validationBackAppearanceScore": 100,
"validationFrontNotPhotocopy": "VALID",
"validationFrontPhotocopyScore": 0,
"validationBackNotPhotocopy": "VALID",
"validationBackPhotocopyScore": 0,
"validationDocumentForensics": "NOT_CHECKED",
"validationNotSpecimen": "NOT_VALID",
"validationLaserMark": "NOT_CHECKED",
"validationFaceLaserMarkScore": -1,
"validationFacialMatchingScore": -1,
"validationDocument": "NOT_VALID",
"validationDocumentContent": "NOT_VALID"
},
"clientVersion": "sdk3.0.0_Web_PC_Chrome_111_Mac_10.15.7_Macintosh",
"scanProcessValidationResult": {
"enabledProcess": true,
"scanProcessValidationResult": "NOT_VALID",
"scanProcessFailedValidations": [
"validationDocumentNotSpecimen",
"validationMRZ",
"validationDocumentNotExpired"
]
}
}

Identity verification​

POST/mobbscan-agent/identityVerification Onboarding token

Performs the tenant-configured liveness check on a user video and compares the face against the scanned document. In a full server-to-server video flow, send the video after document scanning succeeds.

As with Scan document, a validation matrix can decide whether the identity verification is valid. Contact the MobbScan support team to analyse your use case and configure the matrix with the most suitable validations.

Query parameters

  • scanIduuidRequired

    Unique identifier of the scan process, generated when the onboarding process is created.

  • livenessMethodintegerOptional

    Choose the method configured for your tenant. The gateway defaults to 0 if omitted; specify a value explicitly for this integration: -1 no liveness, 0 head movement, 1 passive liveness, 2 passive plus random movement.

    Values: 102-1
  • returnFaceImagesbooleanOptional

    Set to true to receive the face images (faceDocument and faceSelfie) in the response.

Request bodymultipart/form-data

  • videofile· MP4Required

    Video of the user performing the liveness check.

Response200 · application/json

  • codeinteger

    Result of the identity verification: 0 if it succeeded, a negative value indicating the error otherwise.

  • descriptionstring

    Description of the result.

  • timestampstring· yyyy-MM-dd HH:mm:ss.SSS

    Time of the identity verification.

  • scanIduuid

    Unique identifier of the scan process, generated when the onboarding process is created.

  • scoresobject

    Scores between 0 and 1. The threshold of each one can be configured depending on the use case.

  • validationsobject

    Validation result of each check.

  • faceDocumentstring· Base64

    Face extracted from the document, as a Base64-encoded image. Empty unless returnFaceImages is true.

  • faceSelfiestring· Base64

    Face extracted from the selfie video, as a Base64-encoded image. Empty unless returnFaceImages is true.

  • resultScanProcessValidationobject

    Result of the validation matrix. See Validation matrix result.

  • mobbIdRegistrationobject

    Result of the MobbID registration, when it is enabled.

Status codes

  • 200Gateway can return HTTP 200 with a nonzero numeric code for a failed biometric or validation check; examine code, the validations and the final process result.
curl -X POST 'https://{GATEWAY-HOST}/mobbscan-agent/identityVerification?scanId=<scanId>' \
-H 'onboarding-token: <ONBOARDING_TOKEN>' \
-F 'video=@video.mp4'
Responses
200OKapplication/json

Gateway can return HTTP 200 with a nonzero numeric code for a failed biometric or validation check; examine code, the validations and the final process result.

{
"code": 0,
"description": "Identity verification transaction finished successfully",
"timestamp": "2025-09-16 16:13:15.063",
"scanId": "22fc6001-ed8f-471f-a013-3ad1254852f0",
"scores": {
"liveness": 1,
"faceMatching": 0.77,
"identityVerification": 0.89
},
"validations": {
"liveness": "VALID",
"faceMatching": "VALID",
"identityVerification": "VALID"
},
"faceDocument": "/9j/4AA...",
"faceSelfie": "/9j/4AAQ...",
"resultScanProcessValidation": {
"enabledProcess": true,
"scanProcessValidationResult": "VALID",
"scanProcessFailedValidations": []
},
"mobbIdRegistration": {
"result": "DISABLED_MOBB_ID_REGISTRATION",
"completed": false
}
}

The document object​

Data extracted from the document and the result of every document validation, grouped by purpose. Every validation* field returns VALID, NOT_VALID or NOT_CHECKED. *Score fields return a score: a number, except validationBothSidesMatchScore, validationNameBothSidesMatchScore and validationSurnameBothSidesMatchScore, which are returned as strings (for example "100").

Holder data17

  • namestring

    Name of the document holder.

  • surnamestring

    Full surname of the document holder.

  • firstSurnamestring

    First surname of the document holder.

  • secondSurnamestring

    Second surname of the document holder.

  • genderstring

    Gender of the document holder.

    Values: MF
  • dateOfBirthstring

    Date of birth of the document holder.

  • nationalitystring

    Nationality of the document holder.

  • personalNumberstring

    Personal number of the document holder.

  • parentsstring

    Parents of the document holder.

  • addressstring

    Address of the document holder.

  • citystring

    City of the document holder.

  • regionstring

    Region of the document holder.

  • cityOfBirthstring

    City of birth of the document holder.

  • regionOfBirthstring

    Region of birth of the document holder.

  • stateOfBirthNamestring

    Name of the state of birth.

  • stateOfBirthIsoCodestring

    ISO code of the state of birth.

  • countryOfBirthstring

    Country of birth of the document holder.

Document data9

  • documentTypestring

    Specific type of the document.

  • documentNumberstring

    Document number.

  • issuingStatestring

    Issuing state of the document.

  • dateOfIssuingstring

    Date of issue of the document.

  • dateOfExpirystring

    Date of expiry of the document.

  • mrzstring

    Machine-readable zone (MRZ) of the document.

  • laserMarkstring

    Laser mark of the document. null if the document has no laser mark.

  • mrzDataobject

    Data read from the MRZ. See MRZ and VIZ data.

  • vizDataobject

    Data read from the printed visual zone (VIZ). See MRZ and VIZ data.

Content validations38

  • validationBothSidesMatchstring

    Whether the data on both sides of the document match.

  • validationBothSidesMatchScorestring

    Score of the both-sides match validation.

  • validationMRZstring

    Validation of the MRZ.

  • validationMRZCheckDocumentNumberstring

    Check of the document number in the MRZ.

  • validationMRZCheckPersonalNumberstring

    Check of the personal number in the MRZ.

  • validationMRZCheckDateOfBirthstring

    Check of the date of birth in the MRZ.

  • validationMRZCheckDateOfExpirystring

    Check of the date of expiry in the MRZ.

  • validationMRZCheckCompositestring

    Composite check of the MRZ.

  • validationDocumentNumberstring

    Validation of the document number.

  • validationPersonalNumberstring

    Validation of the personal number.

  • validationMRZNameSurnameSeparatorstring

    Validation of the separator between name and surname in the MRZ.

  • validationMRZSurnameSeparatorstring

    Validation of the separator between surnames in the MRZ.

  • validationSexstring

    Validation of the holder's sex.

  • validationGenderstring

    Validation of the holder's gender.

  • validationNationalitystring

    Validation of the nationality.

  • validationDateOfBirthstring

    Validation of the holder's date of birth.

  • validationDateOfExpirystring

    Validation of the document's date of expiry.

  • validationDocumentNotExpiredstring

    Whether the document is not expired.

  • validationLegalAgestring

    Whether the holder is of legal age.

  • validationAllowedIssuingStatestring

    Whether the issuing state is allowed.

  • validationIssuingStatestring

    Validation of the issuing state.

  • validationDateOfIssuingstring

    Validation of the date of issue.

  • validationDatesRelationshipstring

    Whether the dates of the document are consistent with each other.

  • validationNameBothSidesMatchstring

    Whether the name matches on both sides of the document.

  • validationSurnameBothSidesMatchstring

    Whether the surname matches on both sides of the document.

  • validationPersonalNumberBothSidesMatchstring

    Whether the personal number matches on both sides of the document.

  • validationDocumentNumberBothSidesMatchstring

    Whether the document number matches on both sides of the document.

  • validationDateOfBirthBothSidesMatchstring

    Whether the date of birth matches on both sides of the document.

  • validationDateOfExpiryBothSidesMatchstring

    Whether the date of expiry matches on both sides of the document.

  • validationSexBothSidesMatchstring

    Whether the sex matches on both sides of the document.

  • validationGenderBothSidesMatchstring

    Whether the gender matches on both sides of the document.

  • validationNationalityBothSidesMatchstring

    Whether the nationality matches on both sides of the document.

  • validationPersonalNumberFormatstring

    Validation of the personal number format.

  • validationDocumentNumberFormatstring

    Validation of the document number format.

  • validationNameNotEmptystring

    Whether the name is not empty.

  • validationSurnameNotEmptystring

    Whether the surname is not empty.

  • validationNameBothSidesMatchScorestring

    Score of the name match between both sides.

  • validationSurnameBothSidesMatchScorestring

    Score of the surname match between both sides, from 0 to 100.

Appearance validations12

  • validationFrontAppearancestring

    Validation of the appearance of the front side.

  • validationFrontAppearanceScorenumber

    Score of the front appearance validation.

  • validationBackAppearancestring

    Validation of the appearance of the back side.

  • validationBackAppearanceScorenumber

    Score of the back appearance validation.

  • validationFrontNotPhotocopystring

    Whether the front side is not a photocopy.

  • validationFrontPhotocopyScorenumber

    Photocopy score of the front side. 0 if the document is not a photocopy.

  • validationBackNotPhotocopystring

    Whether the back side is not a photocopy.

  • validationBackPhotocopyScorenumber

    Photocopy score of the back side. 0 if the document is not a photocopy.

  • validationDocumentForensicsstring

    Result of the forensic analysis of the document.

  • validationNotSpecimenstring

    Whether the document is not a specimen.

  • validationLaserMarkstring

    Validation of the laser mark of the document.

  • validationFaceLaserMarkScorenumber

    Score of the face laser mark validation. -1 if there is no face laser mark.

Biometrics3

  • validationFacialMatchingScorenumber

    Facial matching score. -1 if facial matching was not performed.

  • facialMatchingScorestring

    Facial matching score.

  • facialLivenessScorestring

    Facial liveness score.

Overall result2

  • validationDocumentstring

    Overall validation result of the document.

  • validationDocumentContentstring

    Overall validation result of the document content.

MRZ and VIZ data​

mrzData and vizData contain the same fields, read respectively from the machine-readable zone and from the printed visual zone. Comparing them is the basis of the VIZ–MRZ coherence checks.

  • dateOfExpirystring

    Date of expiry of the document.

  • genderstring

    Gender of the document holder.

    Values: MF
  • nationalitystring

    Nationality of the document holder.

  • surnamestring

    Full surname of the document holder.

  • documentNumberstring

    Document number.

  • namestring

    Name of the document holder.

  • dateOfBirthstring

    Date of birth of the document holder.

  • personalNumberstring

    Personal number of the document holder.

Validation matrix result​

Mobbeel can configure a validation matrix for your use case. When enabled, scanProcessValidationResult indicates whether the document passed and scanProcessFailedValidations lists failed checks. Retrieve the process data and validations with Get process information; the available fields depend on the configured flow.

  • enabledProcessboolean

    Whether the validation matrix is enabled for the scan process. If it is, check scanProcessValidationResult to get the result.

  • scanProcessValidationResultstring

    Result of the validation matrix for the scan process.

    Values: VALIDNOT_VALIDNOT_CHECKED
  • scanProcessFailedValidationsarray<string>

    Names of the validations that failed. Contains the failed validations when the result is NOT_VALID; empty when it is VALID.