Skip to main content
POST
Face Matching
Biometric face matching API for identity verification using AWS Rekognition. Supports 1:1 face verification, 1:N face search, face registration, and blacklist management.

Overview

The Face Matching API provides comprehensive biometric verification capabilities:
  • 1:1 Verification: Compare two face images to verify identity
  • 1:N Search: Search for a face in the registered collection
  • Face Registration: Register faces in tenant-specific collections
  • Blacklist Management: Flag faces for fraud prevention
  • Presigned Uploads: Secure direct-to-S3 image uploads
Face matching must be enabled for your tenant. Contact support to enable this feature.

Endpoints

Authentication

All endpoints require Bearer token authentication. Required permissions vary by endpoint:

1:1 Face Verification

Compare two face images to determine if they belong to the same person.

Request Parameters

Request Example

Using S3 Images

Response

Response Fields

Zero Data Retention (ephemeral mode)

1:1 verification supports ephemeral data retention: the comparison runs in memory and no images, biometric templates, or match results are persisted. Only an aggregate, non-PII usage event is emitted for billing. Enable it per request with a header or body flag (or tenant-wide via your data processing configuration — contact support):
Equivalent body flag: "data_retention": "ephemeral". Per-request ephemeral must be enabled for your account first: the endpoint identifier facematch.verify (or the wildcard *) has to appear in your tenant’s data_processing_config.allowed_ephemeral_endpoints, otherwise the request is rejected with 400 ZDR_NOT_ENABLED_FOR_TENANT. Tenants with data_processing_config.mode set to ephemeral run every verification ephemerally without needing the allowlist. Contact support to enable either option. Restrictions in ephemeral mode:

Face Registration

Register a face in the tenant’s collection for future searches.

Request Parameters

Request Example

Response

Response Fields


Search for a face across all registered faces in the tenant’s collection.

Request Parameters

Request Example

Response

Response Fields

Match Fields

Blacklisted faces are included in search results (marked with is_blacklisted: true) to alert you when a flagged person is detected.

Add to Blacklist

Mark a registered face as blacklisted for fraud prevention.

Request Parameters

Request Example

Response


Delete Face

Remove a registered face from the collection.

Path Parameters

Request Example

Response


Collection Status

Get status information about the tenant’s face collection.

Request Example

Response

Response Fields


Generate Upload URL

Generate a presigned URL for direct S3 image upload.

Request Parameters

Request Example

Response

Response Fields

Upload Workflow

  1. Request a presigned upload URL
  2. Upload image directly to S3 using the presigned URL
  3. Use the returned s3_uri in register/verify/search endpoints with image_format: "s3"

Error Responses

400 Bad Request

403 Forbidden - Feature Not Enabled

403 Forbidden - Permission Denied

404 Not Found

400 Bad Request - No Face Detected

400 Bad Request - Max Faces Exceeded


Status Codes


Usage Examples

Python Example - Complete Verification Flow

JavaScript Example


Tenant Configuration

Face matching behavior is configured per tenant: Contact support to modify these settings for your tenant.

Best Practices

Image Quality

  • Use high-quality images (minimum 640x480 pixels)
  • Ensure good lighting with face clearly visible
  • Avoid heavily compressed images
  • Face should occupy at least 20% of the image

Security

  • Use presigned URLs for large images to avoid base64 overhead
  • Store face IDs securely - they link to biometric data
  • Implement rate limiting on verification endpoints
  • Review blacklist matches with human oversight

Performance

  • Use S3 image format for large images (>1MB)
  • Keep max_results reasonable in searches
  • Cache collection status if needed frequently
  • Batch registrations when onboarding multiple users

Compliance

  • Inform users about biometric data collection
  • Implement data retention policies
  • Provide mechanism for users to request data deletion
  • Log all face matching operations for audit trails