Skip to main content

Voice Biometrics API

Voice-print enrollment and speaker verification Base path: /api/v1/verify/voice-biometrics Endpoint count: 8

List enrolled voiceprints

GET /api/v1/verify/voice-biometrics/
Cursor-paginated list of voiceprints for this tenant. Returns metadata only — no embedding bytes.

Get voiceprint enrollment status

GET /api/v1/verify/voice-biometrics/enroll/{id}
Returns the enrollment status of a single voiceprint by id (the id returned by POST /enroll). Response shape is { id, status, voiceprint_id, confidence? }. Enrollment is synchronous, so a known id reports enrolled while an unknown or GDPR-erased id returns 404.
id
string
required
The voiceprint id to look up (the vp_-prefixed id returned by POST /enroll). Returns 404 if the id is unknown or its voiceprint was erased.

Voice biometrics overview

GET /api/v1/verify/voice-biometrics/overview
Returns enrolled voiceprint count, recent verification events, 7-day false-accept rate trend, and tenant threshold settings.

Issue a verification challenge nonce

POST /api/v1/verify/voice-biometrics/challenge
Issues a per-attempt liveness/replay-resist challenge phrase. The caller reads the returned phrase aloud, records the audio, and submits both the audio AND the nonceId+phrase on the next POST /verify. The verify path one-shot-consumes the nonce and rejects on missing/expired/reused/mismatched values, defeating recorded-voice replay attacks. 5-minute TTL.

Enroll a voiceprint

POST /api/v1/verify/voice-biometrics/enroll
Upload a WAV audio clip (base64) to enroll a new voiceprint for a contactId. Requires explicit GDPR Art. 9 consent. Rejected if anti-spoof score is below threshold. Returns a 429 with top-level code RATE_LIMIT_EXCEEDED and details.reason voiceprint_tenant_cap_exceeded if the tenant has reached its voice_biometrics.tenant_enroll_cap quota.

Verify a caller by voice

POST /api/v1/verify/voice-biometrics/verify
Upload a WAV audio clip (base64) to verify a contactId against their enrolled voiceprints. Both cosine similarity AND anti-spoof gates must pass.

Update voice biometrics tenant settings

PATCH /api/v1/verify/voice-biometrics/settings
Persist the per-tenant confidence threshold (0.50 permissive → 0.95 strict — governs the cosine-similarity gate on POST /verify) and the auto-escalate-to-2FA-on-low-confidence intent flag. Both values round-trip via GET /overview. Both fields are required — send the full pair on every request.
confidence_threshold
number
required
The cosine-similarity gate a verification must clear to pass, between 0.50 (most permissive) and 0.95 (most strict). Values outside this range are rejected.
auto_2fa_on_low_confidence
boolean
required
When true, a verification that falls below the threshold signals downstream step-up flows to escalate to a second factor instead of returning a hard fail.

Delete a voiceprint (GDPR erasure)

DELETE /api/v1/verify/voice-biometrics/{voiceprintId}
Permanently deletes a voiceprint and its encrypted embedding. GDPR Article 17 right-to-erasure. This is a real DELETE (not a soft-delete), so the record leaves no trace once removed.
This endpoint is not idempotent. A successful delete returns { "deleted": true }. Because the row is erased outright, a second DELETE of the same voiceprintId — including a client retry after a network timeout — returns 404 Not Found, the same as deleting an unknown id. Treat a 404 on retry as confirmation the voiceprint is already gone.
voiceprintId
string
required