curl
curl -X DELETE https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \
-H 'x-api-key: YOUR_API_KEY'import requests
url = "https://verification.didit.me/v3/biometric-templates/{template_uuid}/"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://verification.didit.me/v3/biometric-templates/{template_uuid}/', 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/{template_uuid}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://verification.didit.me/v3/biometric-templates/{template_uuid}/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://verification.didit.me/v3/biometric-templates/{template_uuid}/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/biometric-templates/{template_uuid}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
"outcome": "purged"
}Biometric Templates
Purge Biometric Template
DELETE /v3/biometric-templates// — purge one retained face biometric template: removed from matching, stored template deleted. Idempotent.
DELETE
/
v3
/
biometric-templates
/
{template_uuid}
/
curl
curl -X DELETE https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \
-H 'x-api-key: YOUR_API_KEY'import requests
url = "https://verification.didit.me/v3/biometric-templates/{template_uuid}/"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://verification.didit.me/v3/biometric-templates/{template_uuid}/', 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/{template_uuid}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://verification.didit.me/v3/biometric-templates/{template_uuid}/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://verification.didit.me/v3/biometric-templates/{template_uuid}/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/biometric-templates/{template_uuid}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
"outcome": "purged"
}Purges one template: it is removed from every kind of matching and the stored template is deleted. The purge is irreversible and is recorded on the audit trail with the acting principal.
curl -X DELETE https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \
-H "x-api-key: YOUR_API_KEY"
{ "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "outcome": "purged" }
outcome | Meaning |
|---|---|
purged | The template was purged by this call. |
already_purged | The template had already been purged. Repeating a purge is safe. |
Retry semantics
Didit deletes the stored template first and only then marks the template purged. If a biometric store is unavailable the call returns503, the template moves to status: purge_failed, and it is already excluded from matching. Repeat the same call to finish the purge.
Errors
| Status | When | Body |
|---|---|---|
403 | Console user token, or the API key is not allowed | {"detail": "You do not have permission to perform this action."} |
404 | Unknown template or a template of another application | {"detail": "Biometric template not found."} |
503 | A biometric store was unavailable. The template is in purge_failed and excluded from matching; repeat the call. | {"detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."} |
Other purge points
Templates are also purged when you delete the owning User with Batch Delete Users, when you delete any session of that User withdeletion_instruction: "privacy_erasure", and automatically at expires_at. See Purge points.Authorizations
Path Parameters
Template id, as returned in biometric_template_uuid by the session deletion endpoints, biometric_template_id on a Face Search match, or the list endpoint.
Example:
"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b"