curl
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"}'import requests
url = "https://verification.didit.me/v3/biometric-templates/delete/"
payload = { "template_uuids": ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_uuids: ['9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b', '1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d']
})
};
fetch('https://verification.didit.me/v3/biometric-templates/delete/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/biometric-templates/delete/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'template_uuids' => [
'9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b',
'1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://verification.didit.me/v3/biometric-templates/delete/"
payload := strings.NewReader("{\n \"template_uuids\": [\n \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://verification.didit.me/v3/biometric-templates/delete/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template_uuids\": [\n \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/biometric-templates/delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_uuids\": [\n \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
"outcome": "purged"
},
{
"uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"outcome": "already_purged"
}
]
}Biometric Templates
Bulk Purge Biometric Templates
POST /v3/biometric-templates/delete/ — purge retained face biometric templates by id list, or every template matching a filter. Idempotent per template.
POST
/
v3
/
biometric-templates
/
delete
/
curl
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"}'import requests
url = "https://verification.didit.me/v3/biometric-templates/delete/"
payload = { "template_uuids": ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_uuids: ['9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b', '1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d']
})
};
fetch('https://verification.didit.me/v3/biometric-templates/delete/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/biometric-templates/delete/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'template_uuids' => [
'9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b',
'1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://verification.didit.me/v3/biometric-templates/delete/"
payload := strings.NewReader("{\n \"template_uuids\": [\n \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://verification.didit.me/v3/biometric-templates/delete/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template_uuids\": [\n \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/biometric-templates/delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_uuids\": [\n \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
"outcome": "purged"
},
{
"uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"outcome": "already_purged"
}
]
}Purges many templates in one call. Provide either an explicit id list or
Templates are purged one by one; each result reports
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
Body
application/json
Templates to purge. Required unless delete_all is true. Already purged ids are reported as already_purged.
Minimum array length:
1When true, purges every template matching the filters below (all of the application's templates when no filter is given). template_uuids is ignored. Irreversible.
Only with delete_all: case-insensitive substring match on the owning User's vendor_data.
Only with delete_all: exact match on the owning User.
Only with delete_all.
Available options:
pending, active, expired, held_out_of_use, purge_pending, purge_failed Only with delete_all.
Available options:
session_delete, automatic_retention, backfill Only with delete_all.
Only with delete_all. Must not be earlier than retained_from.
Response
Per-template purge outcomes.
Show child attributes
Show child attributes