Skip to main content

Enrolment

Enrolment creates the biometric template of a user from face or voice samples. Every later verification or identification is compared with it.

Biometric operations take the application in the applicationId header. Each one has three steps: start the operation, send the samples with its operationId and repeat while the response is 202, then read the operation from your backend.

Start a face enrolment​

POST/enrollment/face/start Access token

Starts the face enrolment of a user and returns the operationId to send with the samples.

Roles: API · SDK

You can skip the start call if Mobbeel has preconfigured your application: then send your own operationId with the samples, or none and MobbID generates one.

Headers

  • applicationIdstring· uuidRequired

    Your application ID.

Request bodyapplication/json

  • userIdstringRequired

    User of the operation. For identification, omit it.

Response200 · application/json

  • operationIdstring· uuidOptional

    Identifier of the new operation. Send it with the samples.

Status codes

  • 200Operation started.
  • 400Missing or invalid parameters.
  • 401Invalid or expired auth token. TOKEN_NOT_VALID.
  • 403The biometric method is not enabled for the application. BIOMETRIC_METHOD_NOT_ENABLED.
  • 404User not found. USER_NOT_FOUND.
  • 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/enrollment/face/start' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'Content-Type: application/json' \
-d '{
"userId": "user-0001"
}'
Responses
200OKapplication/json
{
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}

Enrol a user (face)​

POST/enrollment/face Access token

Creates or updates the face template of a user from face images or a short video. If the user already has a face template, it is updated with the new samples.

The user must exist, unless Mobbeel has configured your application to create it on enrolment. Groups in groupId must exist.

Roles: API · SDK

Headers

  • applicationIdstring· uuidRequired

    Your application ID.

  • transactionIdstringOptional

    Your own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.

Request bodymultipart/form-data

  • operationIdstring· uuidOptional

    Identifier of the operation.

  • userIdstringOptional

    Identifier of the user.

  • groupIdstring[]Optional

    Additional groups to enrol the user in. They must exist.

  • samplesfile[]Required

    Face images (JPEG, PNG) or a short video (MP4). Repeat the field to send several.

  • livenessMethodnumberOptional

    Liveness method for presentation attack detection: 1 passive video (the user holds still for a moment), 2 passive image. Omit it to send a single image without liveness.

Response201 · application/json

  • operationIdstringRequired

    Identifier of the operation.

  • userIdstringRequired

    Identifier of the user.

  • progressnumberRequired

    Progress of the enrolment, from 0 to 100. Below 100, send more samples with the same operationId.

  • detectedFaceobjectOptional

Status codes

  • 201User enrolled.
  • 202More samples are needed: send them with the same operationId.
  • 400The sample cannot be used, or liveness failed. BAD_SAMPLE_FORMAT, BAD_SAMPLE_QUALITY, NO_SAMPLE_DETECTED, NOT_ENOUGH_SAMPLE_DATA_DETECTED, MULTIPLE_SAMPLES_DETECTED, NO_LIVENESS_DETECTED.
  • 401Invalid or expired auth token. TOKEN_NOT_VALID.
  • 403The biometric method is not enabled for the application. BIOMETRIC_METHOD_NOT_ENABLED.
  • 404Group or user not found. GROUP_NOT_FOUND, USER_NOT_FOUND.
  • 409The operation was not started, its ID was already used, or the user cannot be added to the group. PROCESS_NOT_STARTED, OPERATION_ALREADY_EXISTS, USER_CAN_NOT_BE_ADDED_TO_GROUP.
  • 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/enrollment/face' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'transactionId: <transactionId>' \
-F 'operationId=3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c' \
-F 'userId=user-0001' \
-F 'livenessMethod=1' \
-F 'samples=@selfie.mp4'
Responses
201Createdapplication/json
{
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c",
"userId": "user-0001",
"progress": 100,
"detectedFace": {
"probe": {
"detected": true,
"box": {
"x": 412,
"y": 236,
"w": 318,
"h": 402
},
"extractedSelfie": "CgRGQUNFEhQyMDI2LTExLTA0VDEwOjE1OjMwWhoE…"
}
}
}

Enrol a user with a template (face)​

POST/enrollment/face/template Access token

Enrols a user from a face template previously obtained with extraction. Requires a started operation.

Roles: API · SDK

Destructive: any face template the user already had is replaced.

Headers

  • applicationIdstring· uuidRequired

    Your application ID.

  • transactionIdstringOptional

    Your own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.

Request bodymultipart/form-data

  • operationIdstring· uuidRequired

    Identifier of the operation.

  • userIdstringRequired

    Identifier of the user.

  • groupIdstring[]Optional

    Additional groups to enrol the user in. They must exist.

  • templatestring· base64Required

    Template to enrol, in base64.

Response201 · application/json

  • operationIdstringRequired

    Identifier of the operation.

  • userIdstringRequired

    Identifier of the user.

  • progressnumberRequired

    Progress of the enrolment, from 0 to 100. Below 100, send more samples with the same operationId.

Status codes

  • 201User enrolled.
  • 400Invalid template. BAD_TEMPLATE_FORMAT, TEMPLATE_VERSIONS_DO_NOT_MATCH.
  • 401Invalid or expired auth token. TOKEN_NOT_VALID.
  • 403The biometric method is not enabled for the application. BIOMETRIC_METHOD_NOT_ENABLED.
  • 404Group or user not found. GROUP_NOT_FOUND, USER_NOT_FOUND.
  • 409The operation was not started, or the user cannot be added to the group. PROCESS_NOT_STARTED, USER_CAN_NOT_BE_ADDED_TO_GROUP.
  • 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/enrollment/face/template' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'transactionId: <transactionId>' \
-F 'operationId=3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c' \
-F 'userId=user-0001' \
-F 'template=CgRGQUNFEhQyMDI2…'
Responses
201Createdapplication/json
{
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c",
"userId": "user-0001",
"progress": 100
}

Start a voice enrolment​

POST/enrollment/voice/start Access token

Starts the voice enrolment of a user and returns the operationId to send with the samples.

Roles: API · SDK

You can skip the start call if Mobbeel has preconfigured your application: then send your own operationId with the samples, or none and MobbID generates one.

Headers

  • applicationIdstring· uuidRequired

    Your application ID.

Request bodyapplication/json

  • userIdstringRequired

    User of the operation. For identification, omit it.

Response200 · application/json

  • operationIdstring· uuidOptional

    Identifier of the new operation. Send it with the samples.

Status codes

  • 200Operation started.
  • 400Missing or invalid parameters.
  • 401Invalid or expired auth token. TOKEN_NOT_VALID.
  • 403The biometric method is not enabled for the application. BIOMETRIC_METHOD_NOT_ENABLED.
  • 404User not found. USER_NOT_FOUND.
  • 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/enrollment/voice/start' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'Content-Type: application/json' \
-d '{
"userId": "user-0001"
}'
Responses
200OKapplication/json
{
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c"
}

Enrol a user (voice)​

POST/enrollment/voice Access token

Creates or updates the voice template of a user from voice recordings. If the user already has a voice template, it is updated with the new samples.

The user must exist, unless Mobbeel has configured your application to create it on enrolment. Groups in groupId must exist.

Roles: API · SDK

Headers

  • applicationIdstring· uuidRequired

    Your application ID.

  • transactionIdstringOptional

    Your own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.

Request bodymultipart/form-data

  • operationIdstring· uuidOptional

    Identifier of the operation.

  • userIdstringOptional

    Identifier of the user.

  • groupIdstring[]Optional

    Additional groups to enrol the user in. They must exist.

  • samplesfile[]Required

    Voice recordings (OGG, MP3, WAV). Repeat the field to send several.

  • livenessMethodnumberOptional

    Liveness method for voice: 0 (VOICE_PLA) detects replayed recordings and AI-generated voices. Omit it to skip liveness.

Response201 · application/json

  • operationIdstringRequired

    Identifier of the operation.

  • userIdstringRequired

    Identifier of the user.

  • progressnumberRequired

    Progress of the enrolment, from 0 to 100. Below 100, send more samples with the same operationId.

Status codes

  • 201User enrolled.
  • 202More samples are needed: send them with the same operationId.
  • 400The sample cannot be used, or liveness failed. BAD_SAMPLE_FORMAT, BAD_SAMPLE_QUALITY, NO_SAMPLE_DETECTED, NOT_ENOUGH_SAMPLE_DATA_DETECTED, MULTIPLE_SAMPLES_DETECTED, NO_LIVENESS_DETECTED.
  • 401Invalid or expired auth token. TOKEN_NOT_VALID.
  • 403The biometric method is not enabled for the application. BIOMETRIC_METHOD_NOT_ENABLED.
  • 404Group or user not found. GROUP_NOT_FOUND, USER_NOT_FOUND.
  • 409The operation was not started, its ID was already used, or the user cannot be added to the group. PROCESS_NOT_STARTED, OPERATION_ALREADY_EXISTS, USER_CAN_NOT_BE_ADDED_TO_GROUP.
  • 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/enrollment/voice' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'transactionId: <transactionId>' \
-F 'operationId=3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c' \
-F 'userId=user-0001' \
-F 'livenessMethod=0' \
-F 'samples=@voice.wav'
Responses
201Createdapplication/json
{
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c",
"userId": "user-0001",
"progress": 100
}

Enrol a user with a template (voice)​

POST/enrollment/voice/template Access token

Enrols a user from a voice template previously obtained with extraction. Requires a started operation.

Roles: API · SDK

Destructive: any voice template the user already had is replaced.

Headers

  • applicationIdstring· uuidRequired

    Your application ID.

  • transactionIdstringOptional

    Your own identifier of a transaction that groups several operations (for example, detections followed by an enrolment), for monitoring and audit.

Request bodymultipart/form-data

  • operationIdstring· uuidRequired

    Identifier of the operation.

  • userIdstringRequired

    Identifier of the user.

  • groupIdstring[]Optional

    Additional groups to enrol the user in. They must exist.

  • templatestring· base64Required

    Template to enrol, in base64.

Response201 · application/json

  • operationIdstringRequired

    Identifier of the operation.

  • userIdstringRequired

    Identifier of the user.

  • progressnumberRequired

    Progress of the enrolment, from 0 to 100. Below 100, send more samples with the same operationId.

Status codes

  • 201User enrolled.
  • 400Invalid template. BAD_TEMPLATE_FORMAT, TEMPLATE_VERSIONS_DO_NOT_MATCH.
  • 401Invalid or expired auth token. TOKEN_NOT_VALID.
  • 403The biometric method is not enabled for the application. BIOMETRIC_METHOD_NOT_ENABLED.
  • 404Group or user not found. GROUP_NOT_FOUND, USER_NOT_FOUND.
  • 409The operation was not started, or the user cannot be added to the group. PROCESS_NOT_STARTED, USER_CAN_NOT_BE_ADDED_TO_GROUP.
  • 429Too many requests: the caller's IP is temporarily or permanently blocked.
curl -X POST 'https://{SERVER-URL}/api/v7/enrollment/voice/template' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-H 'applicationId: <applicationId>' \
-H 'transactionId: <transactionId>' \
-F 'operationId=3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c' \
-F 'userId=user-0001' \
-F 'template=CgRGQUNFEhQyMDI2…'
Responses
201Createdapplication/json
{
"operationId": "3f2b9c1e-7a4d-4e8b-9c21-5d6e7f8a9b0c",
"userId": "user-0001",
"progress": 100
}