> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Purge Biometric Template

> DELETE /v3/biometric-templates/{template_uuid}/ — purge one retained face biometric template: removed from matching, stored template deleted. Idempotent.

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.

```bash theme={null}
curl -X DELETE https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \
  -H "x-api-key: YOUR_API_KEY"
```

```json theme={null}
{ "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 returns `503`, 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](/management-api/users/delete), when you delete any session of that User with `deletion_instruction: "privacy_erasure"`, and automatically at `expires_at`. See [Purge points](/management-api/biometric-templates/overview#purge-points).


## OpenAPI

````yaml DELETE /v3/biometric-templates/{template_uuid}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/biometric-templates/{template_uuid}/:
    delete:
      tags:
        - Biometric Templates
      summary: Purge a retained biometric template
      description: >-
        An opted-in application keeps one separately managed, image-free face
        biometric template anchored to the User when a session is deleted (see
        `DELETE /v3/session/{sessionId}/delete/`). Templates are biometric data
        with a finite `expires_at`; they never contain images, session data, or
        identity fields, and they are purged on User deletion, privacy erasure,
        expiry, or an explicit purge. These endpoints accept application API
        keys (`x-api-key`) only; Business Console user tokens are rejected with
        `403`.


        Purges one template: it is removed from every kind of matching and the
        stored template is deleted. Irreversible and recorded on the audit trail
        with the acting principal.


        **Retry semantics:** Didit deletes the stored template first and only
        then marks the template purged. If a biometric store is unavailable the
        call returns `503`, the template moves to `status: purge_failed` and is
        already excluded from matching; repeat the same call to finish.
        Repeating a purge of an already purged template returns
        `already_purged`.


        Templates are also purged by `POST /v3/users/delete/` for the owning
        User, by any deletion of that User's sessions with
        `deletion_instruction: privacy_erasure`, and automatically at
        `expires_at`.
      operationId: purge_biometric_template
      parameters:
        - in: path
          name: template_uuid
          required: true
          description: >-
            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.
          schema:
            type: string
            format: uuid
            example: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
      responses:
        '200':
          description: Purge outcome.
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    type: string
                    format: uuid
                  outcome:
                    type: string
                    enum:
                      - purged
                      - already_purged
              examples:
                Purged:
                  value:
                    uuid: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
                    outcome: purged
                Already purged:
                  value:
                    uuid: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
                    outcome: already_purged
        '403':
          description: >-
            Console user token, or the API key is not allowed. These endpoints
            accept application API keys only.
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            Unknown template, a template of another application, or (on `GET`) a
            purged template.
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Biometric template not found.
        '503':
          description: >-
            A biometric store was unavailable while retaining or purging a
            biometric template. Nothing is deleted; repeat the same request.
            Retries are idempotent and converge on a single template.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Retryable:
                  value:
                    detail: >-
                      The biometric-template operation could not finish because
                      an external store is unavailable. The operation is
                      retryable.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X DELETE
            https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/
            \
              -H 'x-api-key: YOUR_API_KEY'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````