Skip to main content

Selfie

Upload Selfie

POST /verifications/{id}/selfie

Uploads a selfie for face matching and liveness detection.

Request:

curl -X POST https://api.dev.valydar.com/verifications/{id}/selfie \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@selfie.jpg"

Form Fields:

FieldTypeRequiredDescription
filefileSelfie image (JPEG, PNG; max 10MB)

Response:

{
"id": "sfl_a1b2c3d4e5f6",
"verification_id": "vry_xxx",
"document_type": "selfie",
"filename": "selfie.jpg",
"mime_type": "image/jpeg",
"liveness": {
"passed": true,
"score": 0.87,
"checks": [
{
"name": "texture_frequency",
"passed": true,
"score": 0.91,
"reason": "natural skin texture detected"
}
]
}
}
FieldTypeDescription
idstringSelfie ID (format: sfl_<uuid>)
verification_idstringParent verification ID
document_typestringAlways selfie
filenamestringOriginal filename
mime_typestringMIME type
livenessobjectPassive liveness check result

Notes

  • Exactly one selfie per verification
  • Uploading a second selfie replaces the first
  • The selfie is used for both face match and liveness checks
  • Face must be clearly visible and centred
  • Passive liveness runs automatically on upload
  • Supported formats: JPEG, PNG (WebP not supported)