> ## 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.

# Count Biometric Templates

> GET /v3/biometric-templates/count/ — count the image-free face biometric templates your application retains, using the same filters as the list endpoint.

Returns the number of templates that match the same filters as [List Biometric Templates](/management-api/biometric-templates/list). Purged templates are not counted.

```bash theme={null}
curl -X GET "https://verification.didit.me/v3/biometric-templates/count/?status=active" \
  -H "x-api-key: YOUR_API_KEY"
```

```json theme={null}
{ "count": 128 }
```

Use it to show the total on a dashboard, or to check what a filtered [bulk purge](/management-api/biometric-templates/batch-purge) with `delete_all: true` would touch before you run it.


## OpenAPI

````yaml GET /v3/biometric-templates/count/
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/count/:
    get:
      tags:
        - Biometric Templates
      summary: Count retained biometric templates
      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`.


        Returns the number of templates matching the same filters as the list
        endpoint. Use it to check what a filtered bulk purge with `delete_all:
        true` would touch.
      operationId: count_biometric_templates
      parameters:
        - in: query
          name: vendor_data
          required: false
          description: >-
            Case-insensitive substring match on the owning User's current
            `vendor_data`.
          schema:
            type: string
        - in: query
          name: vendor_user_uuid
          required: false
          description: Exact match on the owning User.
          schema:
            type: string
            format: uuid
        - in: query
          name: status
          required: false
          description: Lifecycle status. Purged templates are never listed.
          schema:
            type: string
            enum:
              - pending
              - active
              - expired
              - held_out_of_use
              - purge_pending
              - purge_failed
        - in: query
          name: source_type
          required: false
          description: How the template was created.
          schema:
            type: string
            enum:
              - session_delete
              - automatic_retention
              - backfill
        - in: query
          name: retained_from
          required: false
          description: Templates retained at or after this time.
          schema:
            type: string
            format: date-time
        - in: query
          name: retained_to
          required: false
          description: >-
            Templates retained at or before this time. Must not be earlier than
            `retained_from` (`400`).
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Count.
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    minimum: 0
              examples:
                Count:
                  value:
                    count: 128
        '400':
          description: >-
            Invalid filter value, or `retained_to` earlier than `retained_from`.
            Field-keyed validation errors.
          content:
            application/json:
              examples:
                Bad range:
                  value:
                    retained_to:
                      - Must be on or after retained_from.
        '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.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/biometric-templates/count/?status=active'
            \
              -H 'x-api-key: YOUR_API_KEY'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````