SourceID Docs

Face Detection Verification

This endpoint allows you to detect faces in an image for verification purposes.

Endpoint: POST {baseurl}/v1/api/verification/detect-faces

Request Body

ParameterTypeRequiredDescription
referencestringYesA unique reference for the verification request.
customerstringNoID of the customer (optional).
verificationGroupstringNoID of the verification group (optional).
base64ImagestringYesBase64 encoded image for detecting faces.

Sample Request

curl -X 'POST' \
  '{baseurl}/v1/api/verification/face-comparison' \
  -H 'accept: application/json' \
  -H 'x-api-key: {API-KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "reference": "09876543567890000002020008006",
  "customer": "68922a8c839016cfca2ff038",
  "verificationGroup": "68ada27c2e94452b66f779b0",
  "base64Image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="
}'

Sample Response

{
  "statusCode": 200,
  "responseCode": "SUCCESS",
  "isValid": true,
  "data": {
    "message": "Successfully detected 2 face(s). The 'faceNumber' corresponds to the face's position from left to right in the image.",
    "facesDetected": 2,
    "faces": [
      {
        "confidence": 99.12,
        "faceNumber": 1
      },
      {
        "confidence": 97.45,
        "faceNumber": 2
      }
    ]
  },
  "referenceId": "Ref-0001",
  "timeStamp": "2025-11-11T13:37:42.123Z"
}