Keep Face Embeddings After Deleting a KYC Session (2026)
By default, deleting a KYC session deletes its face embedding, so the person can re-verify without a duplicate flag. Opt-in biometric-template retention keeps one image-free template anchored to the User.

Contents
In this guide
Jump to the part you need.
This how-to fits teams that delete KYC sessions quickly but still need duplicate and multi-account detection to hold for the people behind them. Face Search 1:N is $0.05 per search on the live price feed. The caveat sits up front: by default the face embedding is deleted with the session, and a retained biometric template is biometric data that stays until its expiry, User deletion, a privacy erasure request or an explicit purge.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Question | Default (delete_with_session) | Opt-in (retain_until_user_deleted) |
|---|---|---|
| What is deleted | The session, all of its data and its face embedding | The session and all of its data; the embedding becomes one image-free template |
| Duplicate detection afterwards | Stops for that person, who can verify again without a duplicate flag | Keeps working through the retained template |
| Where the record lives | Nowhere | Anchored to the User, listed under Lists, Biometric templates |
| How long it lasts | Not applicable | 1 to 3650 days, capped by your retention window and any deadline sent on the call |
| Contains a face image | No | No: numeric template plus retention metadata only |
| How it is removed | Already gone | Explicit purge, User deletion, privacy erasure, or expiry |
Start free in the sandbox at https://business.didit.me/ with no sales call, then read the Biometric Templates API and the Face Search 1:N docs side by side. Developers who drive Didit from an AI assistant can connect the hosted server at https://didit.me/developers/mcp/. Every unit price on this page is on https://didit.me/pricing/.
What deletion does to a face embedding by default
Every KYC session with a liveness selfie carries a face embedding. That embedding is what Face Search 1:N uses to spot a duplicate sign-up or a second account for the same person. When you call DELETE /v3/session/{session_id}/delete/, the session and everything it holds are deleted: the decision, the extracted data, the feature records, the reviews and the activity log, and every stored file, from document images and portraits to liveness video. The face embedding goes with them.
That default is deliberate. It is also why a team that deletes sessions within days of approval loses duplicate detection for exactly the people it deleted, and only finds out when the same face signs up again under a new email. Workflows whose Liveness step has automatic Face Search switched off never stored an embedding in the first place, so there is nothing for retention to keep on those sessions.
Three consequences of the delete call are less obvious. Share tokens issued for the session are not revoked, but there is nothing left for them to import: an import with one returns 400 {"share_token": ["Original session does not exist."]}. Blocklist entries created from the session are not removed; manage those with the Lists endpoints. And the User or Business entity survives the session, so POST /v3/users/delete/ or POST /v3/businesses/delete/ is a separate call, and deleting the User is itself a purge trigger for any template that User anchors.

What a retained biometric template is, and is not
Opt in, and Didit still deletes the session and all of its data. What changes is the embedding. Instead of being destroyed, it becomes one separately managed, image-free face biometric template anchored to the session's User. Duplicate-face, multi-account, biometric-authentication and list matching keep working for that person through the template.
What the template holds: the numeric face template plus retention metadata. What it never holds: the face image, the liveness video, document data, extracted identity fields, the decision, or the deleted session's id. It is biometric data, scoped to your application, and it is never used for model training, analytics or cross-customer fraud processing. Every template has a finite expires_at, and each one is visible in the Business Console under Lists, Biometric templates, and on the owning User's profile.
Retention has nothing to act on if the embedding was never stored. Automatic Face Search runs during liveness checks by default and that is what writes the embedding; a workflow with it switched off stores none, and its sessions come back with a retention outcome of none however you configure the policy.
Deleted vs retained, field by field
| Data | Delete with session (default) | Retain template (opt-in) |
|---|---|---|
| Decision and status | Deleted | Deleted |
| Extracted document fields | Deleted | Deleted |
| Document images, selfies, videos, portraits | Deleted | Deleted |
| Feature records (ID, AML, IP, phone, POA) | Deleted | Deleted |
| Reviews and activity log | Deleted | Deleted |
| Share tokens issued for the session | Not revoked, but an import with one returns 400 because the original session no longer exists | Same: the token is not revoked and the import still returns 400 |
| Webhooks still queued for the session | Dropped | Dropped |
| Face embedding | Deleted | Replaced by one image-free template |
| Template uuid, expiry, retention metadata | Does not exist | Kept until purge, User deletion or expiry |
| User entity | Kept | Kept, and holds the template |
| Blocklist entries created from the session | Kept | Kept |
| Credits already consumed | Not refunded | Not refunded |
Prerequisites
- A workflow whose Liveness step runs automatic Face Search and stores the embedding. Workflows with automatic Face Search switched off never store an embedding, so retention has nothing to keep for their sessions.
vendor_dataon the session, linking it to a User. Without a User there is nothing to anchor a template to.- An API key with the
delete:sessionsprivilege for the deletion call, and a plain API key for the templates endpoint. Console user tokens get 403 on/v3/biometric-templates/. - A retention period in days, an integer from 1 to 3650. The setting cannot be saved without it.
- Controller instructions and a privacy notice that cover biometric retention. Have those before you switch the setting on, not after.
Step by step: delete the session and keep the embedding
Choose the window. Decide how long the template must live. Didit applies the earliest of three values: the days you set, your application's general data-retention window, and any
face_retention_deadlineyou send with a deletion.Set the application policy in the console. Go to Business Console, App Settings, Data retention, turn on Retain biometric template, enter the days, and save. The policy applies to deletions from that point on and creates or purges nothing that already exists.
Or set the same policy with one call.
PATCH /v3/webhook/takes both fields. A retention policy without days is rejected with 400.curl -X PATCH https://verification.didit.me/v3/webhook/ \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"face_retention_policy": "retain_until_user_deleted", "face_retention_days": 365}'Check the session carries
vendor_data. That value is what ties the session to a User, and the User is what the template hangs from. Sessions without it answerineligible_no_vendor_useron retention.Delete the session with the per-call override. This keeps the template even if the application policy says otherwise. Omit the body entirely to follow the application policy.
curl -X DELETE https://verification.didit.me/v3/session/<SESSION_ID>/delete/ \ -H "x-api-key: <API_KEY>" \ -H "Content-Type: application/json" \ -d '{"retain_face_embeddings": true, "face_retention_days": 365}'Read the response before you continue. The endpoint returns 200 with a JSON body.
face_retention_outcomeis the field that tells you what actually happened.{ "session_id": "9f1a2c34-5d6e-4f70-8a91-0b1c2d3e4f50", "session_number": 1024, "face_retention_outcome": "retained_with_user", "biometric_template_uuid": "c2b7d1e0-3a44-4b18-9c55-7e6f8a9b0c1d", "biometric_template_expires_at": "2027-11-26T10:00:00Z", "deleted_child_verifications": 0 }Confirm the template exists. List what your application holds and match it to the User you deleted the session for.
curl -X GET 'https://verification.didit.me/v3/biometric-templates/?limit=50' \ -H 'x-api-key: YOUR_API_KEY'

What duplicate detection looks like after the deletion
A retained template takes part in matching only while its status is active, it is not held out of use, it is not past expires_at, and its User still exists. When the same face comes back, POST /v3/face-search/ returns a match whose source is retained_template. On that match, session_id, session_number, status, api_service, match_image_url and user_details are null, because the session is gone; vendor_data and vendor_user_id identify the User, and biometric_template_id is the template you can inspect or purge.
Purging a template you kept
Four events remove a template and take it out of matching: an explicit purge, deleting the owning User, any session deletion for that User sent with deletion_instruction set to privacy_erasure, and automatic expiry at expires_at. Switching the application policy back to delete_with_session does not purge existing templates. Purge them explicitly.
curl -X DELETE https://verification.didit.me/v3/biometric-templates/<TEMPLATE_UUID>/ \
-H "x-api-key: YOUR_API_KEY"
The response is 200 with {"uuid": "...", "outcome": "purged"} or "already_purged". For bulk removal, POST /v3/biometric-templates/delete/ takes {"template_uuids": [...]} or {"delete_all": true} with optional filters that narrow it.
Failure cases and recovery
| Symptom | Cause | Fix |
|---|---|---|
| 400 on the delete call | privacy_erasure combined with retain_face_embeddings: true | Pick one intent. Erasure never retains. |
| 400 on the delete call or the PATCH | Retention requested with no days available anywhere | Send face_retention_days between 1 and 3650, or store it on the application policy first |
face_retention_outcome is none | The session had no face embedding, for example a KYB session, a document-only KYC session, or a workflow with automatic Face Search off | Nothing to fix; there was nothing to keep |
face_retention_outcome is ineligible_no_vendor_user | The session has no linked User | Send vendor_data at session creation so retention can anchor next time |
403 on /v3/biometric-templates/ | A Console user token, or a key that is not allowed on that endpoint | Use an application API key in x-api-key |
404 {"detail": "Biometric template not found."} | Unknown uuid, or the template is already purged | Re-read the list or count endpoint; purged templates are not listed |
503 with status purge_failed | An external store was unavailable during the purge | The template is already out of matching; repeat the purge, the operation is retryable |
404 on DELETE /v3/session/{id}/delete/ | Session already deleted, or unknown id | Nothing to do; the call is idempotent |
Inputs and outputs
| Field | Direction | Meaning |
|---|---|---|
retain_face_embeddings | Input, boolean or null | Overrides the application policy for this deletion |
face_retention_days | Input, integer 1 to 3650 | Finite retention for the template; required when retaining unless the application already sets it |
face_retention_deadline | Input, ISO 8601 in the future | Optional hard expiry; the earliest of days, window and deadline wins |
deletion_instruction | Input | operational_session_delete by default, or privacy_erasure |
instruction_id | Input, max 255 characters | Your own durable reference, stored on the audit trail and on any retained template |
face_retention_outcome | Output | deleted, retained_with_user, none or ineligible_no_vendor_user |
biometric_template_uuid | Output | The template you can inspect or purge, or null |
biometric_template_expires_at | Output | When the retained template is deleted, or null |
deleted_child_verifications | Output | For KYB, how many key-people or owner verifications went with it; always 0 for KYC |
Paid steps and review boundaries
Deletion does not refund credits already consumed by the verification. Nothing in the public price book is billed per retained template, so the billable lines around this feature are the verification itself and Face Search 1:N at $0.05 per search. Read both on the pricing page and in the docs pricing page before you size a budget.
The review boundary is legal, not technical. A retained template is biometric data: not anonymous, not transient, not deleted with the session. Enable retention only where your controller instruction and privacy notice cover it, and pick a window that satisfies the laws applying to your users. Illinois (BIPA), Texas (CUBI) and Colorado require a notice and an explicit release before face geometry is collected, and Didit exposes that consent step, documented in biometric consent. For EU users, an erasure request under the GDPR maps to a delete call with deletion_instruction set to privacy_erasure, which purges every retained template for that User.
Worked cost example
Take a consumer app that approves 10,000 sign-ups a month at the full KYC bundle of $0.33 per check, deletes each session 30 days after approval, and wants duplicate detection to survive for a year.
- Verification: 10,000 x $0.33 = $3,300.00 a month.
- Standalone Face Search 1:N for a 2,000-a-month re-check queue: 2,000 x $0.05 = $100.00 a month.
- Monthly total at list price: $3,300.00 + $100.00 = $3,400.00.
- Same volume on Scale, at 10% off Didit prices: $0.297 x 10,000 = $2,970.00, plus $0.045 x 2,000 = $90.00, so $3,060.00 a month.
- Templates in circulation at steady state with a 365-day window: 10,000 x 12 = 120,000. The price book has no per-template line, so this number changes your storage and privacy obligations, not your Didit bill.
Did retention change Delete Session? A note on the breaking change
The default did not change. A bare DELETE still deletes the session and the face embedding. Two things differ from older integrations: the endpoint now returns 200 with a JSON body reporting face_retention_outcome instead of 204, and the optional body accepts retain_face_embeddings, face_retention_days, face_retention_deadline, deletion_instruction and instruction_id. If your client asserts on 204, update it to read the body. Details are on Delete Session API and Data Retention and Deletion.
If you drive these calls from an AI assistant, the hosted server wraps the same endpoints: MCP setup for every client. The full product index for agents is at didit.me/llms.txt, and the one-prompt integration route is at didit.me/developers/integration-prompt/.
Sources
- Delete Session API: GDPR right-to-be-forgotten
- Biometric Templates API overview
- Data Retention and Deletion: privacy controls
- Face Search 1:N API: duplicate detection
- Biometric consent for BIPA, CUBI and Colorado
- Didit API errors: status codes and fixes
- Integration prompt for coding agents
- Didit pricing and the pricing docs, read November 26, 2026
- Didit MCP server setup
- Regulation (EU) 2016/679 (GDPR)
Next step: open the sandbox at https://business.didit.me/, create an application, run one test session with vendor_data so it links to a User, then delete it with retain_face_embeddings: true and read face_retention_outcome. No sales call is needed, and sandbox testing is free. Teams that already delete sessions in production should confirm their privacy notice covers biometric retention before they turn the setting on for live traffic.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
Does deleting a KYC session delete the face embedding?
By default, yes. A DELETE /v3/session/{session_id}/delete/ call removes the session, all of its data and the face embedding that powered duplicate detection, so the person can verify again without being flagged as a duplicate. Retention only happens if your application has opted in, or if that individual delete call sends retain_face_embeddings: true.
How do I delete a KYC session but keep the face embedding for duplicate detection?
Set the application policy to retain_until_user_deleted with a finite face_retention_days value, then delete the session as usual and read face_retention_outcome in the response. You can also skip the policy and send retain_face_embeddings: true plus face_retention_days on a single delete call. Either way the session is deleted and one image-free template stays anchored to the User.
Which wins, face_retention_policy or retain_face_embeddings?
face_retention_policy is the application-level default, set in the console or with PATCH /v3/webhook/. retain_face_embeddings on a delete call overrides that default for one deletion: true keeps a template, false deletes the embedding, and omitting it follows the application policy.
Do I have to send face_retention_days when I delete a session?
Yes, unless the application policy already stores a value. face_retention_days accepts an integer from 1 to 3650, and a request that retains with no days available anywhere is rejected with 400. The template expires at the earliest of those days, your general retention window, and any face_retention_deadline you send.
What does the ineligible_no_vendor_user outcome mean?
The delete call asked to retain a template but the session had no linked User, because it carried no vendor_data. Nothing can anchor the template, so the session and its embedding are deleted and the response reports ineligible_no_vendor_user. Send vendor_data when you create sessions if you want retention to work.
Why did a template purge return 503 with status purge_failed?
A service Didit depends on for template storage was unavailable, so the operation could not finish. The template moves to purge_failed and is already excluded from matching, so it no longer affects duplicate detection. Repeat the purge; the docs mark that operation as retryable.
Why do I get 403 on the biometric templates endpoint?
Usually the caller sent a Console user token, or an API key that is not allowed on that endpoint. The Biometric Templates API accepts API keys only, in the x-api-key header. Change the credential and retry the call.
Why does GET on a template return 404?
Either the uuid is wrong or the template has already been purged. Purged templates are not listed and no longer resolve, and the body reads {"detail": "Biometric template not found."}. Check the uuid against the list endpoint first, then inspect the single template.
Did biometric-template retention break the Delete Session API?
The default behaviour did not change, but the response did: the endpoint now returns 200 with a JSON body reporting face_retention_outcome, biometric_template_uuid and biometric_template_expires_at, where older clients expected 204. Clients that assert on 204 must read the body instead. The optional request body adds these controls, so a bare delete still works.
Can a retained template be used for model training or cross-organization matching?
No. A retained template is scoped to your application and used only for your duplicate-face, multi-account, biometric-authentication and list matching. Didit does not use it for model training, analytics or cross-customer fraud processing, and the template never contains the face image or the deleted session's identity data.
Does switching the policy back to delete_with_session purge existing templates?
No. Changing the policy only affects deletions from that point on. Existing templates keep their expiry and must be purged explicitly with DELETE /v3/biometric-templates/{uuid}/ or the bulk purge endpoint, or by deleting the owning User.
What happens to retained templates on a privacy erasure request?
A delete call with deletion_instruction set to privacy_erasure purges every retained template for that User and never retains a new one, whatever the application policy says. Combining erasure with retain_face_embeddings: true is rejected with 400. Use it for GDPR and other data-subject erasure requests.
What happens to share tokens after the session is deleted?
Share tokens issued for the session are not revoked by the delete call, but there is nothing left for them to import. An import made with one returns 400 with the body {"share_token": ["Original session does not exist."]}. Treat the token as dead and issue a new one only against a session that still exists.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


