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

# ユーザー一括削除API：GDPRに基づくデータ消去

> Diditのベンダーユーザーをvendor_dataで一括削除、またはアプリケーション内の全ユーザーを削除できます。GDPR・CCPAの「忘れられる権利」に準拠しています。



ユーザー一括削除プロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Goal: Permanently delete one or many Didit User entities. The matching user records, their tag links, their comment history, and every retained biometric template anchored to them are removed permanently. Verification sessions are NOT removed by this endpoint; delete those separately with POST /v3/sessions/delete/.

Endpoint: POST https://verification.didit.me/v3/users/delete/
Auth header: x-api-key: <DIDIT_API_KEY>
Content-Type: application/json

Request body — provide at least one selector:
\- vendor_data_list: string[] — your own identifiers (case-insensitive after normalisation).
\- didit_internal_id_list: string[] — Didit internal user IDs, the didit_internal_id returned by the create and get endpoints. Can be combined with vendor_data_list; the two are OR'd.
\- delete_all: true — wipe every user in this application. No confirmation, no undo. Takes precedence: when delete_all is true, the two lists are ignored.

\- retain_face_embeddings: boolean, default false — your explicit choice to keep one image-free biometric template of each deleted person for duplicate detection. Everything else about the person is deleted. Requires face_retention_days.
\- face_retention_days: integer 1 to 3650 — how many days that template is kept. Sent without retain_face_embeddings: true it returns 400 on face_retention_days.

This endpoint never narrows delete_all with filters. The Console's filter_* batch params (filter_search, filter_status, filter_country, filter_date_from, filter_date_to, filter_tag, filter_latest_verification_status, filter_risk, filter_has_sessions, filter_has_open_alerts, filter_aml_monitoring, filter_can_sign_in, filter_auth_status, filter_auth_method, filter_auth_mfa_enabled) are NOT supported here. Any of them sent with a value, even false, is rejected with a 400 keyed by that field, and any other unknown filter_* key with "Unknown filter.", so a narrowed intent does not wipe the whole application. Exception: filter_has_approved_sessions and filter_has_declined_sessions are neither rejected nor applied, so with delete_all they still delete every user. Do not send them.

curl:
curl -X POST 'https://verification.didit.me/v3/users/delete/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"vendor_data_list": ["user-123", "user-456"]}'

Response 200:
\{
"deleted": <int — number of users actually deleted; excludes vendor_data values that didn't match>
}

Biometric templates: unless you set retain_face_embeddings to true, if the application retained image-free biometric templates for these users after session deletion (see /management-api/biometric-templates/overview), Didit purges every one of them before the user is deleted, so the person stops matching in duplicate detection and Face Search. The purge is audited with instruction_source: vendor_user_delete.

Idempotency: re-sending the same list returns deleted: 0 after the first run (unmatched IDs are silently skipped). There is no undo.

Failure modes:
\- 400 — no selector supplied, or a Console-only filter_* param was sent.
No selector: {"vendor_data_list": ["This field is required unless delete_all is true."]}. An unknown filter_* key: {"filter_<name>": ["Unknown filter."]}.
\- 401 — missing/invalid x-api-key.
\- 403 — the API key is revoked or is not valid for this application.
\- 409 — the selection includes a person in a finalized regulatory report. Nothing is deleted. The body has code: in_filed_report and reports[] with uuid, report_number, report_type and case_uuid. Delete the reports, then repeat the request.
\- 429 — rate-limited.
\- 503 — {"detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."} A retained biometric template could not be purged. No user in the request is deleted; the affected template is already excluded from matching. Repeat the same request.

WARNING — delete_all: true: there is no confirmation step and no undo. Restrict to API keys you intentionally provision for batch maintenance.

When to prefer status change instead:
\- For day-to-day blocking, use PATCH /v3/users/{vendor_data}/update-status/ with {"status": "BLOCKED"} — it keeps the audit trail intact while rejecting future sessions for the same identifier.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.`

\</pre>



      
      

貼り付け先

## 概要1件以上の[ユーザーエンティティ](https://docs.didit.me/ja/entities/users/overview.md)を削除します。ユーザーレコードは完全に削除されます。ユーザーの認証セッションはこのエンドポイントの対象外で、ユーザーとの紐付けが解除された状態で残ります。セッションは[セッションの削除](https://docs.didit.me/ja/sessions-api/delete-session.md)または[セッションの一括削除](https://docs.didit.me/ja/management-api/sessions/batch-delete.md)で削除してください。取引も対象外です。取引は[取引の一括削除](https://docs.didit.me/ja/management-api/transactions/delete.md)で削除してください。## 使用する場面- **忘れられる権利**に基づくリクエスト(GDPR / CCPA)。
- QA中のテストユーザーの**クリーンアップ**。
- 自社プラットフォームから削除したユーザーの**デプロビジョニング**。## 注意事項- `vendor_data`の値のリスト、`didit_internal_id`の値のリスト、または`delete_all: true`を受け付けます。2つのリストは組み合わせることができ、OR条件で評価されます。
- このエンドポイントはフィルターで`delete_all`を絞り込むことはなく、Consoleの`filter_*`一括パラメーターは`400`で拒否されます。そのため、絞り込みを意図したリクエストでアプリケーション内のすべてのユーザーが削除されることはありません。
  例外は`filter_has_approved_sessions`と`filter_has_declined_sessions`です。これらは拒否も適用もされないため、`delete_all`と一緒に送信しないでください。
- 全件成功か全件失敗のいずれかです。選択したユーザーの削除を完了できない場合、どのユーザーも削除されず、同じリクエストを安全に繰り返すことができます。
- 冪等です。同じリストを再送信すると、初回実行後は`deleted: 0`が返されます。
- 返されるのは削除された件数のみで、項目ごとのレポートは返されません。何にも一致しなかった値は通知なくスキップされます。重複した識別子は1回しかカウントされないため、`deleted`を送信した識別子の数と比較したい場合は、重複を除いたリストを送信してください。
- 削除時にWebhookは送信されません。Webhookはユーザーのステータスやデータの変更時に送信され、削除時には送信されません。そのため、削除のシグナルが必要な連携では、自社側で削除を記録する必要があります。
- ユーザーに紐付いた認証セッションは、このエンドポイントでは削除されません。セッションはユーザーとの紐付けが解除された状態で残るため、その書類、顔、メディアはセッション自体を削除して初めて削除されます。
- `retain_face_embeddings`(boolean、デフォルトは`false`)と`face_retention_days`(1〜3650)は、重複検知のために、削除された人物1人につき画像を含まない生体認証テンプレートを1件、指定した日数だけ保持するという明示的な選択です。その人物に関するそれ以外の情報は一切保持されません。両方を省略すると、テンプレートはユーザーとともに削除されます。`retain_face_embeddings: true`なしで`face_retention_days`を指定した場合、または`face_retention_days`なしで`retain_face_embeddings: true`を指定した場合は、`face_retention_days`に対して`400`が返されます。
- `retain_face_embeddings`を`true`に設定しない限り、ユーザーに紐付いて保持されている[生体認証テンプレート](https://docs.didit.me/ja/management-api/biometric-templates/overview.md)は、ユーザーが削除される前に完全に削除されます。生体認証ストアが利用できないためにテンプレートを削除できない場合、呼び出しは`503`を返し、リクエスト内のどのユーザーも削除されません。リクエストを繰り返すと処理が完了します。## 確定済みの規制当局向けレポートに含まれるデータ選択した人物のいずれかが、確定済みの規制当局向けレポートを持つケースに含まれている場合、リクエスト全体が`409`を返し、何も削除されません。レスポンスは`code: in_filed_report`を使用し、各レポートを示すため、Consoleでそのレポートを開くことができます。```json theme={null}
{
  "detail": "A case about this person or company has a filed regulatory report, so it cannot be deleted.",
  "code": "in_filed_report",
  "reports": [
    {
      "uuid": "5ec00000-0000-4000-8000-000000000007",
      "report_number": "SAR-0001",
      "report_type": "SAR",
      "case_uuid": "c1a5e000-0000-4000-8000-000000000001"
    }
  ]
}
```[レポートの削除](https://docs.didit.me/ja/management-api/regulatory-reports/delete.md)で各レポートを削除してから、同じリクエストを繰り返してください。選択した別の人物がまだレポートに含まれている場合、ある人物をリストから除外するだけでは不十分です。## 権限アプリケーションの有効なAPIキーであれば、どれでもこのエンドポイントを呼び出せます。DiditのAPIキーは
**役割単位ではなくアプリケーション単位**です。Consoleの[役割と権限](https://docs.didit.me/ja/console/roles-permissions.md)
(`delete:users`など)は、Consoleで*人*が実行できる操作を決めるもので、
Management APIのトラフィックに対しては評価されません。このエンドポイントを呼び出せる人を管理するには、
アプリケーションのAPIキーを閲覧できる人を管理してください。## 関連項目- [データ保持](https://docs.didit.me/ja/console/data-retention.md)
- [監査ログ](https://docs.didit.me/ja/console/audit-logs.md)
- [ユーザー操作](https://docs.didit.me/ja/entities/users/operations.md)
- [生体認証テンプレート](https://docs.didit.me/ja/management-api/biometric-templates/overview.md)


## OpenAPI

````yaml ja/openapi-25.json POST /v3/users/delete/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 本人確認API。x-api-keyヘッダーで認証します。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/users/delete/:
    post:
      tags:
        - Users
      summary: ユーザーの一括削除
      description: >-
        ユーザーを**完全に削除**します。ユーザーレコードは完全に削除されます。日常的なブロックには、`BLOCKED`を指定した[ユーザーステータスの更新](#patch-/v3/users/-vendor_data-/update-status/)を使用してください。ユーザーは`vendor_data_list`、`didit_internal_id_list`、またはその両方を同時に指定して選択するか、`delete_all:
        true`を渡します。このエンドポイントがフィルターで`delete_all`の対象を絞り込むことはありません。コンソールのPeopleフィルターは`400`で拒否されるため（`400`レスポンスを参照）、絞り込むつもりのリクエストが全件削除になることはありません。例外が2つあります。`filter_has_approved_sessions`と`filter_has_declined_sessions`は拒否も適用もされないため、`delete_all:
        true`と併用してもすべてのユーザーが削除されます。これらは送信しないでください。


        **生体認証テンプレート:**
        `retain_face_embeddings`を`true`に設定しない限り、セッション削除後にこれらのユーザーについて保持されている画像を含まない生体認証テンプレート（`/v3/biometric-templates/`を参照）はすべて、ユーザーの削除前に消去されます。これにより、その人物は重複検出と顔検索で一致しなくなります。`retain_face_embeddings:
        true`と`face_retention_days`を指定すると、1人につき画像を含まない生体認証テンプレートを1つ、その日数だけ保持することを選択でき、その人物に関するそれ以外の情報は一切保持されません。生体認証ストアが利用できないためにテンプレートを消去できない場合、呼び出しは`503`を返し、リクエスト内のユーザーは1人も削除されません。同じリクエストを再度実行すると処理が完了します。


        **提出済みの規制レポート:**
        選択したデータが確定済みの規制レポートに含まれている場合、リクエスト全体が`409`で拒否され、何も削除されません。レスポンス本文には`code:
        in_filed_report`が含まれ、各レポートが`uuid`、`report_number`、`report_type`、`case_uuid`で示されます。レポートを削除してから、リクエストを再度実行してください。
      operationId: batch_delete_users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: >-
                `vendor_data_list`、`didit_internal_id_list`、または`delete_all:
                true`を指定してください。2つのリストは組み合わせることができ、OR条件で評価されます。`delete_all`が`true`の場合はそれが優先され、両方のリストは無視されます。
              properties:
                vendor_data_list:
                  type: array
                  items:
                    type: string
                  description: 削除するお客様独自の識別子で、送信した値と完全一致で照合されます。
                didit_internal_id_list:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: >-
                    削除するDidit内部ユーザーIDです。作成および取得のエンドポイントが返す`didit_internal_id`を指定します。
                delete_all:
                  type: boolean
                  default: false
                  description: '`true`の場合、アプリケーション内のすべてのユーザーを削除します。'
                retain_face_embeddings:
                  type: boolean
                  default: false
                  description: >-
                    削除された各人物について、重複検知のために画像を含まない生体認証テンプレートを1つ、`face_retention_days`の期間保持するというお客様の明示的な選択です。その人物に関するそれ以外のものはすべて削除されます。ユーザーとともにテンプレートも削除する場合は、省略するか`false`を送信してください。`true`の場合、`face_retention_days`は必須です。
                face_retention_days:
                  type: integer
                  minimum: 1
                  maximum: 3650
                  description: >-
                    `retain_face_embeddings`が`true`の場合に、画像を含まない生体認証テンプレートを保持する日数。同フィールドと併せて指定する必要があり、同フィールドなしで指定すると`face_retention_days`に対する`400`で拒否されます。
                  example: 365
            examples:
              Specific users:
                summary: vendor_dataでユーザーを削除
                value:
                  vendor_data_list:
                    - user-123
                    - user-456
              By Didit internal ID:
                summary: didit_internal_idでユーザーを削除
                value:
                  didit_internal_id_list:
                    - 3f1c0d3e-8f0a-4c2e-9a3d-9b1f5f4a2c11
              All users:
                summary: このアプリケーションのすべてのユーザーを消去
                value:
                  delete_all: true
              Keep face templates:
                summary: ユーザーを削除し、匿名の顔テンプレートを365日間保持
                value:
                  vendor_data_list:
                    - user-123
                  retain_face_embeddings: true
                  face_retention_days: 365
      responses:
        '200':
          description: ユーザーが削除されました。実際に削除されたユーザー数を返します。
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: integer
                    description: 削除されたユーザーの数です（何にも一致しなかったvendor_dataの値は含みません）。
              examples:
                Deleted some:
                  value:
                    deleted: 2
                Nothing matched:
                  value:
                    deleted: 0
        '400':
          description: >-
            バリデーションエラー。何も削除されません。エラーはフィールド名をキーとします。セレクターがない場合（どちらのリストもなく、`delete_all`が`true`でない場合）、ボディは`{"vendor_data_list":
            ["This field is required unless delete_all is
            true."]}`です。空のリストは、そのリスト自身のキーで`"This list may not be
            empty."`として拒否されます。Console専用のフィルター（`filter_search`、`filter_status`、`filter_country`、`filter_date_from`、`filter_date_to`、`filter_tag`、`filter_latest_verification_status`、`filter_risk`、`filter_has_sessions`、`filter_has_open_alerts`、`filter_aml_monitoring`、`filter_can_sign_in`、`filter_auth_status`、`filter_auth_method`または`filter_auth_mfa_enabled`）は、値を持つ場合は`false`であっても常に拒否され、該当する各フィールドをキーとするオブジェクトが返されます。その他の不明な`filter_*`キーは`"Unknown
            filter."`として拒否されます。
          content:
            application/json:
              examples:
                Missing selector:
                  summary: listとdelete_allのどちらも指定されていません
                  value:
                    vendor_data_list:
                      - This field is required unless delete_all is true.
                Console-only filter:
                  value:
                    filter_has_sessions: >-
                      This filter is Console-only and is not supported by this
                      endpoint.
        '401':
          description: >-
            認証情報が指定されていません。`x-api-key`ヘッダー（または`Authorization:
            Bearer`トークン）なしの`/v3/users/*`パスへのリクエストは、APIに到達する前に認証ミドルウェアによって拒否されます。
          content:
            application/json:
              examples:
                Missing credentials:
                  value:
                    detail: >-
                      You must be authenticated with a valid access token to
                      access this endpoint.
        '403':
          description: >-
            APIキーが無効であるか取り消されている、またはこのキーではこのアプリケーションのユーザーを削除できません。キーがない場合は`403`、誤ったキー、取り消されたキー、期限切れのキーの場合は`401`が返されます。
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '409':
          description: 選択内容に、確定済みの規制当局向けレポートに含まれる人物が含まれています。何も削除されません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InFiledReportError'
        '429':
          description: レート制限を超過しました。間隔を空け、`Retry-After`で示された時間が経過してから再試行してください。
          content:
            application/json:
              examples:
                Rate limited:
                  value:
                    detail: Request was throttled. Expected available in 30 seconds.
        '503':
          description: >-
            生体認証テンプレートの保持または消去中に、生体認証ストアが利用できませんでした。何も削除されていません。同じリクエストを再度送信してください。再試行は冪等で、単一のテンプレートに収束します。
          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 POST 'https://verification.didit.me/v3/users/delete/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"vendor_data_list": ["user-123", "user-456"]}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.users.batch_delete(
                vendor_data_list=["user-123", "user-456"],
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.users.batchDelete({
              vendor_data_list: ["user-123", "user-456"],
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.BatchDelete(ctx, didit.UsersBatchDeleteParams{\n\tVendorDataList: didit.Some([]string{\"user-123\", \"user-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.util.List;

            import me.didit.Didit;

            import me.didit.types.UsersBatchDeleteParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.users().batchDelete(UsersBatchDeleteParams.builder()
                    .vendorDataList(List.of("user-123", "user-456"))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->users->batchDelete([
                'vendor_data_list' => ['user-123', 'user-456'],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result = didit.users.batch_delete(vendor_data_list: ["user-123",
            "user-456"])

            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.Users.BatchDeleteAsync(new
            UsersBatchDeleteParams

            {
                VendorDataList = new string[] { "user-123", "user-456" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    InFiledReportError:
      type: object
      description: >-
        選択したデータが確定済みの規制レポートに含まれているため、削除は拒否されます。何も削除されません。レポートを削除してから、リクエストを繰り返してください。
      required:
        - detail
        - code
      properties:
        detail:
          type: string
        code:
          type: string
          enum:
            - in_filed_report
          description: 確定済みの規制レポートによって削除がブロックされた場合の固定のエラーコード。
        reports:
          type: array
          items:
            $ref: '#/components/schemas/FiledRegulatoryReport'
          description: 人物、企業、ケース、またはセッションの削除を妨げているレポート。
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/FiledReportTransaction'
          description: 取引の削除を妨げている取引と、それぞれの取引を記載しているレポート。
    FiledRegulatoryReport:
      type: object
      description: 要求された削除を妨げる、確定済みの規制当局向けレポート。
      required:
        - uuid
        - report_number
        - report_type
        - case_uuid
      properties:
        uuid:
          type: string
          format: uuid
          description: レポートのUUID。
        report_number:
          type: string
          description: Consoleに表示されるレポート番号（例：SAR-0001）。
        report_type:
          type: string
          enum:
            - SAR
            - STR
            - CTR
            - TTR
            - UTR
            - IFT
            - CBR
            - TFR
          description: 規制当局向けレポートの種類。
        case_uuid:
          type: string
          format: uuid
          description: レポートが属するケース。
    FiledReportTransaction:
      type: object
      description: 確定済みの規制当局向けレポートに記載されているため、削除できない取引。
      required:
        - uuid
        - transaction_id
        - reports
      properties:
        uuid:
          type: string
          format: uuid
          description: Diditの取引UUIDです。
        transaction_id:
          type: string
          description: 取引の作成時に指定された取引識別子。
        reports:
          type: array
          items:
            $ref: '#/components/schemas/FiledRegulatoryReport'
          description: この取引を含む確定済みのレポートです。
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.