Voice Biometrics API
Voice-print enrollment and speaker verification Base path:/api/v1/verify/voice-biometrics
Endpoint count: 8
title: “Errors worth branching on” description: “Per-endpoint failure templates matching the envelope — what actually fires, what to retry, what to surface to the operator.”
Errors worth branching on
These five failures cover the verify call (POST /api/v1/voice-biometrics/verify), hammered per IVR turn. Each block below is a full{ error, meta } envelope as the API returns it, and the matrix at the bottom answers retry vs surface for the same five classes. For the platform-wide decision table these branches plug into, see the error handling guide.
401 — Unauthorized
401 on this page is the bearer key failing before the route ran — it never means the resource is wrong. Rotate the key or re-mint the scoped token; retrying the same request changes nothing.
403 — Forbidden
403 means the key authenticated but the operation is gated by scope — check the key’s scopes on the developer page; a 403 is never a data-not-found shape.
422 — Schema
422 means the payload did not match the request schema — branch on error.details.field and enrol the customer first, then re-fire verify with a long enough sample instead of blind-retrying the same body.
429 — Rate
Retry-After header and error.details.retry_after are both set on every 429 — resend the SAME request after the lower of the two.
404 — Not found
60-second retry matrix
Worked request and response samples
Copy the request as written, substitute your own ids, and compare the response envelope — a success in the same shape the numbered error sections spell out.Enroll a voiceprint
POST /api/v1/verify/voice-biometrics/enrollList enrolled voiceprints
GET /api/v1/verify/voice-biometricsGet voiceprint enrollment status
GET /api/v1/verify/voice-biometrics/enroll/{id}{ id, status, voiceprint_id, confidence? }. Enrollment is synchronous, so a known id reports enrolled; an unknown or GDPR-erased id returns 404.
Voice biometrics overview
GET /api/v1/verify/voice-biometrics/overviewIssue a verification challenge nonce
POST /api/v1/verify/voice-biometrics/challengephrase 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.
Id of the contact to challenge (1–255 characters). The returned nonce + phrase must echo back on the next POST /verify.
Enroll a voiceprint
POST /api/v1/verify/voice-biometrics/enrollvoiceprint_tenant_cap_exceeded if the tenant has reached its voice_biometrics.tenant_enroll_cap quota.
Base64-encoded WAV clip (max 30s / 2MB) used to build the embedding. Rejected below the anti-spoof floor.
Verbatim GDPR Art. 9 consent text the speaker agreed to (10–5000 characters). Stored for the audit trail.
Version tag of the consent copy (e.g.
gdpr-art9-v1), so revoking a version can target the right enrollments.Verify a caller by voice
POST /api/v1/verify/voice-biometrics/verifyBase64-encoded WAV probe clip (max 30s / 2MB). Both the cosine-similarity gate AND the anti-spoof gate must pass for a match.
The
nonceId returned by POST /challenge. One-shot-consumed on verify; reuse/expiry/mismatch is rejected. Omit both challenge fields to skip liveness.Update voice biometrics tenant settings
PATCH /api/v1/verify/voice-biometrics/settingsCosine-similarity gate a verification must clear, between 0.50 (permissive) and 0.95 (strict). Values outside the range are rejected.
When true, a below-threshold verification signals downstream step-up flows to escalate to a second factor instead of a hard fail.
Delete a voiceprint (GDPR erasure)
DELETE /api/v1/verify/voice-biometrics/{voiceprintId}