curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"delete_all": true, "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f"}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.biometric_templates.batch_delete(
template_uuids=["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"],
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.biometricTemplates.batchDelete({
template_uuids: ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"],
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.BiometricTemplates.BatchDelete(ctx, didit.BiometricTemplatesBatchDeleteParams{
TemplateUUIDs: didit.Some([]string{"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.List;
import me.didit.Didit;
import me.didit.types.BiometricTemplatesBatchDeleteParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.biometricTemplates().batchDelete(BiometricTemplatesBatchDeleteParams.builder()
.templateUuids(List.of("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->biometricTemplates->batchDelete([
'template_uuids' => ['9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b', '1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'],
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.biometric_templates.batch_delete(template_uuids: ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"])
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.BiometricTemplates.BatchDeleteAsync(new BiometricTemplatesBatchDeleteParams
{
TemplateUuids = new string[] { "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d" },
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"results": [
{
"uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
"outcome": "purged"
},
{
"uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"outcome": "already_purged"
}
]
}Bulk Purge Biometric Templates API
POST /v3/biometric-templates/delete/ — purge retained face biometric templates by id list, or every template matching a filter. Idempotent per template.
curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"delete_all": true, "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f"}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.biometric_templates.batch_delete(
template_uuids=["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"],
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.biometricTemplates.batchDelete({
template_uuids: ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"],
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.BiometricTemplates.BatchDelete(ctx, didit.BiometricTemplatesBatchDeleteParams{
TemplateUUIDs: didit.Some([]string{"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.List;
import me.didit.Didit;
import me.didit.types.BiometricTemplatesBatchDeleteParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.biometricTemplates().batchDelete(BiometricTemplatesBatchDeleteParams.builder()
.templateUuids(List.of("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->biometricTemplates->batchDelete([
'template_uuids' => ['9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b', '1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'],
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.biometric_templates.batch_delete(template_uuids: ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"])
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.BiometricTemplates.BatchDeleteAsync(new BiometricTemplatesBatchDeleteParams
{
TemplateUuids = new string[] { "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d" },
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"results": [
{
"uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
"outcome": "purged"
},
{
"uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"outcome": "already_purged"
}
]
}delete_all: true, optionally narrowed by the same filters as List Biometric Templates.
Request body
| Field | Type | Description |
|---|---|---|
template_uuids | UUID[] | Templates to purge. Required unless delete_all is true. Ids that are already purged are reported as already_purged. |
delete_all | boolean | When true, purges every template that matches the filters below (all of the application’s templates when no filter is given). template_uuids is ignored. |
vendor_data | string | Only with delete_all: case-insensitive substring match on the owning User’s vendor_data |
vendor_user_uuid | UUID | Only with delete_all: exact match on the owning User |
status | enum | Only with delete_all: pending, active, expired, held_out_of_use, purge_pending, purge_failed |
source_type | enum | Only with delete_all: session_delete, automatic_retention, backfill |
retained_from, retained_to | datetime | Only with delete_all: retained-date range |
delete_all: true without filters purges every biometric template in the application and cannot be undone. Run Count Biometric Templates with the same filters first to confirm what will be purged.Examples
- By id
- Every template of one User
- Every template in the application
curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"template_uuids": ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]}'
curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"delete_all": true, "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f"}'
curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"delete_all": true}'
{
"results": [
{ "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "outcome": "purged" },
{ "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "outcome": "already_purged" }
]
}
purged or already_purged. If a biometric store is unavailable the call returns 503 at the first failing template; templates purged earlier in the same request stay purged, the failing one moves to purge_failed (already excluded from matching), and repeating the request finishes the job.
Errors
| Status | When | Body |
|---|---|---|
400 | Neither template_uuids nor delete_all: true provided | {"template_uuids": ["This field is required unless delete_all is true."]} |
400 | Invalid filter value, or retained_to earlier than retained_from | Field-keyed validation errors |
403 | Console user token, or the API key is not allowed | {"detail": "You do not have permission to perform this action."} |
503 | A biometric store was unavailable; repeat the request | {"detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."} |
Authorizations
Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.
Headers
Optional retry-safety key you choose for one operation, up to 255 characters (a UUID works). A request repeated with the same key, endpoint, query and body is answered with the first response, same status and same body, and runs and bills nothing a second time. The same key with another endpoint, query or body returns 409 idempotency_key_reused, and while the first request is still running, 409 idempotency_key_in_progress with Retry-After. A failed request (any 4xx or 5xx) is not stored, so you can send it again with the same key. Keys belong to your application, whether you call with an API key or an access token. See Retries and idempotency.
1 - 255