> ## 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: KYC 정리

> 세션 번호로 또는 전체를 한 번에 KYC 세션을 삭제합니다. 최대 20개는 세션별 결과를 반환하며, 그 이상은 조회 가능한 삭제 작업으로 실행됩니다. Didit 제공.



세션 일괄 삭제 프롬프트
        프롬프트를 클립보드에 복사



      
      

\<pre>

\`Goal: Delete a list of User Verification (KYC) sessions, or every session, for the calling application, and control what happens to each session's face biometric data. KYC only — KYB sessions are not covered here; use DELETE /v3/session/{sessionId}/delete/ for a single KYB or KYC session.

Endpoint: POST https://verification.didit.me/v3/sessions/delete/
Auth header: x-api-key: YOUR_API_KEY
Content-Type: application/json

Request body — provide EXACTLY ONE selector:
\- session_numbers: string[] — UI-visible decimal session numbers ("#1234" style), NOT UUIDs. Each entry must be digits only (regex ^[0-9]+$). minItems: 1.
\- delete_all: true — delete every remaining KYC session for the application. When delete_all is true, session_numbers is ignored.

Narrowing delete_all (optional, only together with delete_all: true):
\- filter_<name> - any filter of GET /v3/sessions/ (see /sessions-api/list-sessions) prefixed with filter_, with the same values: filter_status, filter_workflow_id, filter_date_from, filter_date_to, filter_vendor_data, filter_country, filter_document_type, filter_warning, filter_search and the others. Filters that take several values in GET /v3/sessions/ (status, workflow_id, country, region, document_type, document_name, session_type, warning, organization_name) accept a comma-separated string or an array. The others take one value: an array is joined into one comma-separated value, so several dates, UUIDs or api_service values are refused with 400, and several texts are not matched as alternatives. An empty value is ignored and does not narrow the selection.
\- An unknown filter_* key returns 400 { "filter_<name>": "Unknown filter." } and a value that cannot be read returns 400 keyed by that filter_* key (for example { "filter_date_from": ["Enter a valid date."] }). Nothing is deleted in either case.
\- A deletion job applies the same filters.

Optional retention and instruction fields (same semantics as the single-session endpoint, applied to every matched session):
\- retain_face_embeddings (boolean | null) — true keeps an image-free biometric template anchored to each session's User; false deletes the embedding with the session; omit/null follows the application's face_retention_policy.
\- face_retention_days (integer 1-3650) — required when retaining unless the application sets face_retention_days.
\- face_retention_deadline (ISO 8601 datetime, future) — optional hard expiry.
\- deletion_instruction ("operational_session_delete" default | "privacy_erasure") — privacy_erasure purges every retained template for each session's User and never retains a new one. Cannot be combined with retain_face_embeddings: true (400).
\- instruction_id (string, max 255) — your durable reference for this instruction; recorded on the audit trail and on every retained template.

curl:
curl -X POST 'https://verification.didit.me/v3/sessions/delete/' \
-H "x-api-key: YOUR_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"session_numbers": ["1001", "1002", "1003"]}'

Response: the number of matching sessions decides, whether they are selected by session_numbers or with delete_all.

Up to 20 matching sessions: they are deleted in the request. Response 200 (this endpoint no longer returns 204):
\{
"results": [
\{"session_id": "<uuid>", "session_number": 1001, "face_retention_outcome": "deleted", "biometric_template_uuid": null, "biometric_template_expires_at": null, "deleted_child_verifications": 0},
\{"session_id": "<uuid>", "session_number": 1002, "face_retention_outcome": "retained_with_user", "biometric_template_uuid": "<uuid>", "biometric_template_expires_at": "<ISO 8601 datetime>", "deleted_child_verifications": 0},
\{"session_id": "<uuid>", "session_number": 1003, "face_retention_outcome": "failed_retryable", "biometric_template_uuid": null, "biometric_template_expires_at": null, "deleted_child_verifications": 0}
]
}
face_retention_outcome per session:
\- deleted: session and face embedding deleted (default).
\- retained_with_user: session deleted; an image-free biometric template stays anchored to the User until biometric_template_expires_at (manage it via /v3/biometric-templates/).
\- none: the session had no face embedding.
\- ineligible_no_vendor_user: retention requested but the session has no linked User; session and embedding deleted.
\- failed_retryable: the group this session was deleted with could not be deleted (a storage service, a biometric store or a monitoring provider was unavailable). That session is NOT deleted and is still in place; re-run the request for it. Other groups in the same request are unaffected.
deleted_child_verifications is always 0 here: this endpoint deletes KYC sessions only.

More than 20 matching sessions: they are deleted in the background. Response 202 with a deletion job:
\{"job_id": "<uuid>", "status": "PENDING", "total": 250, "processed": 0, "outcomes": {"deleted": 0, "none": 0, "retained_with_user": 0, "ineligible_no_vendor_user": 0, "failed_retryable": 0, "already_deleted": 0}, "deleted_child_verifications": 0, "error": null, "created_at": "<datetime>", "completed_at": null}
Poll GET /v3/sessions/delete/{job_id}/ every few seconds until status is COMPLETED or FAILED. The job reports counts per outcome, never which sessions it deleted. A delete_all job deletes only the sessions created before the request. A FAILED job explains why in error; the sessions it had not reached are still in place, so repeat the request to delete them.

Side effects:
\- Each matched session is deleted along with everything it produced, including every verification attempt: its decision, its extracted data, its KYC / Face / AML / Location / POA / Phone / Email records, its reviews and activity log, and all of its stored files.
\- The sessions stop appearing in GET /v3/sessions/ and GET /v3/session/{sessionId}/decision/, and media URLs issued before the call stop resolving.
\- Webhook deliveries still queued for the deleted sessions, and their retries, are dropped. Webhooks already delivered are not affected.
\- Share tokens issued for the sessions are NOT revoked, but there is nothing left for them to import: an import with one returns 400 {"share_token": ["Original session does not exist."]}.
\- Blocklist entries created from the sessions are NOT removed.
\- Credits already consumed by the verifications are NOT refunded.
\- The parent User entities are NOT deleted; use POST /v3/users/delete/ for those (that also purges their retained templates).
\- NO deletion webhook is emitted.
\- Sessions are deleted in groups; a failure in one group does not roll back the others. Numbers that no longer match a live session are skipped and do not appear in results.

Idempotency: re-running with the same session_numbers deletes nothing more (numbers that no longer match a session are skipped). Deletion is permanent and cannot be undone.

Failure modes:
\- 400: validation, nothing deleted:
\{ "session_numbers": ["This field is required unless delete_all is true."] }
\{ "session_numbers": ["All session_numbers must be numeric."] }
\{ "retain_face_embeddings": ["Privacy erasure cannot retain biometric templates."] }
\{ "detail": "A finite biometric-template retention duration is required." }
\{ "filter_reviewer": "Unknown filter." }
\{ "filter_date_from": ["Enter a valid date."] }
\- 409: at least one selected session is part of 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.
\- 403: API key invalid or application not allowed. { "detail": "You do not have permission to perform this action." }

Migration note: until this release the endpoint returned 204 with an empty body; it now returns 200 with results[], or 202 with a deletion job when more than 20 sessions match. Existing applications stay on delete_with_session until you explicitly change the policy.

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

\</pre>



      
      

붙여넣을 곳

## 동작 방식일치하는 각 세션은 [세션 삭제](https://docs.didit.me/ko/sessions-api/delete-session.md)와 똑같이 삭제됩니다. 세션, 세션이 보유한 모든 인증 시도, 세션의 결정 및 추출된 데이터, 기능 레코드, 저장된 모든 파일이 삭제되며, 세션은 모든 조회 엔드포인트에서 사라지고 이전에 발급된 미디어 URL은 더 이상 확인(resolve)되지 않습니다. 삭제된 세션에 대해 아직 대기 중인 webhook 전송과 그 재시도는 취소됩니다. 이미 전송된 webhook에는 영향이 없습니다. 삭제는 영구적이며 되돌릴 수 없습니다.선택한 세션 중 하나라도 확정된 규제 보고서에 포함되어 있으면, 요청 전체가 `409`를 반환하고 아무것도 삭제되지 않습니다. 응답에는 `code: in_filed_report`가 포함되며 각 보고서가 이름으로 표시됩니다. 각 보고서를 [보고서 삭제](https://docs.didit.me/ko/management-api/regulatory-reports/delete.md)로 삭제한 다음 요청을 다시 실행하십시오. 보고서를 삭제해도 세션은 삭제되지 않으며, 이 요청을 다시 실행하기 전까지 세션은 그대로 남아 있습니다.`session_numbers`로 선택하든 `delete_all`로 선택하든, 일치하는 세션 수에 따라 요청에 대한 응답이 달라집니다.| 일치하는 세션 수 | 응답 |
| - | - |
| 최대 20개 | 세션이 삭제되면 `200 OK`를 반환하며, `results`에 일치한 세션마다 결과 하나가 포함됩니다. |
| 20개 초과 | 삭제 작업과 함께 `202 Accepted`를 반환합니다. 세션은 백그라운드에서 삭제되며, 완료될 때까지 [세션 삭제 작업 조회](https://docs.didit.me/ko/management-api/sessions/get-deletion-job.md)를 주기적으로 호출하십시오. |결과는 `face_retention_outcome`이 `failed_retryable`인 경우를 제외하고 세션이 삭제되었음을 확인합니다. 이 경우 해당 세션은 **삭제되지 않았으며** 여전히 남아 있습니다. 따라서 이 결과는 삭제 확인이 아니라 재시도해야 하는 실패로 처리하십시오.
애플리케이션에서 활성 KYC 세션과 일치하지 않는 번호는 건너뛰며, `results`에 나타나지 않습니다.## `delete_all` 필터로 범위 좁히기`delete_all: true`를 사용하면 [세션 목록 조회](https://docs.didit.me/ko/sessions-api/list-sessions.md)의 필터를 `filter_` 접두사와 함께 사용해 선택 범위를 좁힐 수 있습니다.
필터는 쿼리 파라미터와 같은 값을 사용합니다.
여러 값을 받을 수 있는 필터(`status`, `workflow_id`, `country`, `region`, `document_type`, `document_name`, `session_type`, `warning`, `organization_name`)는 쉼표로 구분된 문자열이나 배열을 받을 수 있습니다.```json theme={null}
{
  "delete_all": true,
  "filter_status": ["Declined"],
  "filter_workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "filter_date_from": "2026-09-01",
  "filter_date_to": "2026-09-30"
}
```- 필터는 `delete_all`과 함께 사용할 때만 적용됩니다. `session_numbers`와 함께 사용하면 필터는 검사만 되고 선택 범위는 바뀌지 않습니다.
- 그 밖의 모든 필터는 값을 하나만 받습니다.
  배열은 쉼표로 구분된 값 하나로 합쳐지므로, 날짜, UUID 또는 `api_service` 값을 여러 개 지정하면 `400`이 반환됩니다. 또한 `vendor_data`, `search`, `screened_full_name` 텍스트를 여러 개 지정하면 이들은 대체 조건으로 매칭되지 않습니다.
- 값이 비어 있는 필터는 무시되므로 선택 범위를 좁히지 않습니다.
- 알 수 없는 `filter_*` 키는 `400`과 `{"filter_reviewer": "Unknown filter."}`를 반환합니다. 값을 읽을 수 없으면 해당 `filter_*` 키로 `400`이 반환되며, 예를 들어 `{"filter_date_from": ["Enter a valid date."]}`와 같습니다.
  두 경우 모두 아무것도 삭제되지 않으므로, 잘못 입력한 필터가 삭제 범위를 모든 세션으로 넓히는 일은 없습니다.
- 삭제 작업에도 같은 필터가 적용되며, 모든 `delete_all`과 마찬가지로 요청 이전에 생성된 세션만 대상으로 합니다.## 보존 및 지시 필드이 엔드포인트는 단일 세션 엔드포인트와 같은 선택적 필드를 받으며, 이를 일치하는 모든 세션에 적용합니다.| 필드 | 타입 | 설명 |
| - | - | - |
| `retain_face_embeddings` | boolean 또는 null | 이 요청에 대해 애플리케이션의 `face_retention_policy`를 재정의합니다. |
| `face_retention_days` | integer (1-3650) | 보존되는 템플릿의 유한 보존 기간입니다. 보존할 때 필수이며, 애플리케이션에 `face_retention_days`가 설정되어 있으면 생략할 수 있습니다. |
| `face_retention_deadline` | datetime (ISO 8601) | 선택 사항인 최종 만료 시점입니다. 반드시 미래 시점이어야 합니다. |
| `deletion_instruction` | `operational_session_delete`(기본값) 또는 `privacy_erasure` | `privacy_erasure`는 세션을 삭제하기 전에 각 세션의 사용자에 대해 보존된 모든 템플릿을 제거하며, `retain_face_embeddings: true`와 함께 사용할 수 없습니다. |
| `instruction_id` | string (최대 255자) | 이 지시에 대한 지속적인 참조 값입니다. 감사 로그와 보존된 모든 템플릿에 기록됩니다. |보존된 템플릿에 포함되는 내용과 포함되지 않는 내용, `expires_at`이 계산되는 방식, 개인정보 삭제 지시의 동작에 대해서는 [세션 삭제](https://docs.didit.me/ko/sessions-api/delete-session.md#얼굴-생체-데이터-삭제-또는-보존)를 참조하십시오.## 세션별 결과일치하는 세션이 최대 20개인 경우 `200 OK`는 세션마다 결과 하나를 반환합니다.```json theme={null}
{
  "results": [
    { "session_id": "4c5c7f3a-3b1d-4b7e-9c39-2b4f7e6a1d02", "session_number": 1001, "face_retention_outcome": "deleted", "biometric_template_uuid": null, "biometric_template_expires_at": null, "deleted_child_verifications": 0 },
    { "session_id": "b8e1d2c3-4f5a-4b6c-8d7e-9f0a1b2c3d4e", "session_number": 1002, "face_retention_outcome": "retained_with_user", "biometric_template_uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "biometric_template_expires_at": "2027-10-09T10:15:00Z", "deleted_child_verifications": 0 },
    { "session_id": "7a1e9c2d-5f4b-4c3a-8e2d-1b0a9f8e7d6c", "session_number": 1003, "face_retention_outcome": "ineligible_no_vendor_user", "biometric_template_uuid": null, "biometric_template_expires_at": null, "deleted_child_verifications": 0 },
    { "session_id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f", "session_number": 1004, "face_retention_outcome": "failed_retryable", "biometric_template_uuid": null, "biometric_template_expires_at": null, "deleted_child_verifications": 0 }
  ]
}
```각 결과에는 [세션 삭제](https://docs.didit.me/ko/sessions-api/delete-session.md#응답) 응답과 같은 필드가 포함됩니다. `biometric_template_expires_at`은 보존된 템플릿이 삭제되는 시점이며, 이 엔드포인트는 KYC 세션만 삭제하므로 `deleted_child_verifications`는 항상 `0`입니다.| `face_retention_outcome` | 의미 |
| - | - |
| `deleted` | 세션과 얼굴 임베딩이 삭제됩니다. 기본 동작입니다. |
| `retained_with_user` | 세션은 삭제됩니다. 이미지가 없는 생체 인식 템플릿 하나가 사용자에 연결된 상태로 남으며, 그 ID는 `biometric_template_uuid`입니다. |
| `none` | 세션에 삭제하거나 보존할 얼굴 임베딩이 없었습니다. |
| `ineligible_no_vendor_user` | 보존이 요청되었지만 세션이 사용자에 연결되어 있지 않아 템플릿을 연결할 대상이 없습니다. 세션과 얼굴 임베딩은 삭제됩니다. |
| `failed_retryable` | 이 세션과 함께 삭제가 시도된 그룹이 삭제되지 못했습니다. 스토리지 서비스, 생체 정보 저장소 또는 모니터링 제공업체를 사용할 수 없었기 때문입니다. 이 세션은 **삭제되지 않았으며** 여전히 남아 있습니다. 이 세션에 대해 요청을 다시 실행하십시오. 재시도는 하나의 템플릿으로 수렴합니다. |세션은 그룹 단위로 삭제됩니다. 그룹을 삭제하지 못하면 그 안의 모든 세션이 `failed_retryable`로 보고됩니다. 다른 그룹에는 영향이 없으며 삭제된 상태를 유지합니다.## 대량 선택은 작업으로 실행됩니다일치하는 세션이 20개를 초과하면 응답은 `results` 대신 삭제 작업을 담은 `202 Accepted`입니다:```json theme={null}
{
  "job_id": "5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b",
  "status": "PENDING",
  "total": 250,
  "processed": 0,
  "outcomes": { "deleted": 0, "none": 0, "retained_with_user": 0, "ineligible_no_vendor_user": 0, "failed_retryable": 0, "already_deleted": 0 },
  "deleted_child_verifications": 0,
  "error": null,
  "created_at": "2026-10-09T10:15:00Z",
  "completed_at": null
}
````status`가 `COMPLETED` 또는 `FAILED`가 될 때까지 몇 초마다 [Get Session Deletion Job](https://docs.didit.me/ko/management-api/sessions/get-deletion-job.md)을 폴링하세요.- 작업은 각 결과별 세션 수를 보고하며, 어떤 세션을 삭제했는지는 보고하지 않습니다.
- `delete_all` 작업은 요청 이전에 생성된 세션만 삭제합니다. 작업이 실행되는 동안 시작된 세션은 삭제되지 않습니다.
- 요청의 보존 및 지시 필드는 작업이 삭제하는 모든 세션에 적용됩니다.
- 그룹을 아직 삭제할 수 없으면 작업이 스스로 재시도합니다.
- `FAILED` 작업은 원인을 `error`에 설명합니다. 작업이 도달하지 못한 세션은 그대로 남아 있으므로, 요청을 다시 보내 삭제하세요.## 예제> [tab] 숫자로 삭제
>
> ```bash theme={null}
> curl -X POST https://verification.didit.me/v3/sessions/delete/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"session_numbers": ["1001", "1002", "1003"]}'
> ```> [tab] 삭제하고 템플릿 보존
>
> ```bash theme={null}
> curl -X POST https://verification.didit.me/v3/sessions/delete/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "session_numbers": ["1001", "1002"],
>     "retain_face_embeddings": true,
>     "face_retention_days": 365,
>     "instruction_id": "post-approval-cleanup-2026-08"
>   }'
> ```> [tab] 개인정보 삭제
>
> ```bash theme={null}
> curl -X POST https://verification.didit.me/v3/sessions/delete/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "session_numbers": ["1001"],
>     "deletion_instruction": "privacy_erasure",
>     "instruction_id": "dsar-2026-0142"
>   }'
> ```> [tab] 전체 삭제 후 작업 폴링
>
> ```bash theme={null}
> curl -X POST https://verification.didit.me/v3/sessions/delete/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"delete_all": true}'
>
> # More than 20 sessions matched: the response is 202 with a job_id.
> curl https://verification.didit.me/v3/sessions/delete/JOB_ID/ \
>   -H "x-api-key: YOUR_API_KEY"
> ```## 204 응답에서의 마이그레이션이 릴리스 이전에는 이 엔드포인트가 `204 No Content`를 반환했습니다. 이제는 `results[]`와 함께 `200 OK`를, 일치하는 세션이 20개를 초과하면 삭제 작업과 함께 `202 Accepted`를 반환합니다. `204`를 검사하는 클라이언트는 업데이트하세요. 기본 삭제 동작은 변경되지 않았습니다. 정책을 명시적으로 변경하기 전까지 기존 애플리케이션은 `delete_with_session`을 계속 사용합니다.## 관련 문서- [Delete Session](https://docs.didit.me/ko/sessions-api/delete-session.md)
- [Get Session Deletion Job](https://docs.didit.me/ko/management-api/sessions/get-deletion-job.md)
- [생체 인식 템플릿](https://docs.didit.me/ko/management-api/biometric-templates/overview.md)
- [데이터 보존](https://docs.didit.me/ko/console/data-retention.md)


## OpenAPI

````yaml ko/openapi-25.json POST /v3/sessions/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/sessions/delete/:
    post:
      tags:
        - Sessions
      summary: session_number로 KYC 세션 일괄 삭제
      description: >-
        숫자 형식의 `session_number`를 지정하여 사용자 인증(KYC) 세션을 일괄 삭제하거나, `delete_all:
        true`를 사용하여 애플리케이션 내의 모든 KYC 세션을 삭제합니다.


        `session_number`는 콘솔 세션 목록에 표시되며 세션 생성 및 결정 endpoint에서 `session_number`로
        반환되는 사람이 읽기 쉬운 증가형 카운터입니다. 이는 `session_id` UUID가 **아닙니다**. UUID로 세션을
        삭제하거나 이 endpoint에서 처리하지 않는 기업 확인(KYB) 세션을 삭제하려면 대신 `DELETE
        /v3/session/{sessionId}/delete/`를 사용하십시오.


        **요청당 최대 20개의 세션이 즉시 삭제되며, 그 이상은 작업(job)으로 실행됩니다.** `session_numbers`로
        선택하든 `delete_all`로 선택하든 일치하는 세션 수에 따라 처리 방식이 결정됩니다:

        - 일치하는 세션이 최대 20개인 경우: 응답이 반환되기 전에 삭제되며, `results[]`에 세션당 하나의 항목이 포함된
        `200` 응답이 반환됩니다.

        - 20개를 초과하는 경우: 삭제 작업이 포함된 `202` 응답이 반환되고 세션은 백그라운드에서 삭제됩니다. `status`가
        `COMPLETED` 또는 `FAILED`가 될 때까지 `GET /v3/sessions/delete/{job_id}/`를
        폴링하십시오. 작업은 결과별 건수만 보고하며, 삭제된 세션 목록은 보고하지 않습니다. `delete_all` 작업은 요청 전에
        생성된 세션만 삭제하며, 작업 실행 중에 시작된 세션은 삭제되지 않습니다.


        삭제된 각 세션은 단일 세션 삭제 endpoint와 정확히 동일하게 처리됩니다. 세션, 세션에 포함된 모든 인증 시도, 해당 결정
        및 추출된 데이터, 관련 기능 레코드(신분증 인증, 얼굴, 라이브니스, 얼굴 대조 등) 및 저장된 모든 파일이 삭제되고, 모든
        조회 endpoint에서 사라지며, 이전에 발급된 미디어 URL의 연결이 중단됩니다. 삭제된 세션에 대해 대기열에 남아 있는
        webhook 전송 및 재시도는 삭제되며, 이미 전송된 webhook에는 영향을 주지 않습니다. 차단 목록 항목은 제거되지
        **않으며**, 이미 소비된 크레딧은 환불되지 **않고**, 상위 User 엔터티는 삭제되지 **않습니다**(해당 항목은
        `POST /v3/users/delete/` 사용). 삭제에 대한 webhook은 발생하지 않습니다. 삭제는 영구적이며 되돌릴 수
        없습니다.


        **선택 의미:**

        - `delete_all: true`를 사용하면 접두사 `filter_`가 붙은 `GET /v3/sessions/`의 필터(예:
        `filter_status`, `filter_workflow_id`, `filter_date_from`)를 사용하여 선택 대상을
        좁힐 수 있습니다. 세션 목록 조회에서 여러 값을 허용하는 필터(`status`, `workflow_id`, `country`,
        `region`, `document_type`, `document_name`, `session_type`, `warning`,
        `organization_name`)는 쉼표로 구분된 문자열 또는 배열을 허용하며, 다른 필터는 단일 값을 받습니다. 빈 값은
        무시됩니다. 필터는 `delete_all`과 함께 사용할 때만 적용되며, 삭제 작업에도 동일한 필터가 적용됩니다.

        - 알 수 없는 `filter_*` 키가 있거나 필터 값을 읽을 수 없는 경우 아무것도 삭제되기 전에 전체 요청이 `400`으로
        거부되므로 잘못 입력된 필터로 인해 삭제 범위가 모든 세션으로 확장되지 않습니다.

        - 애플리케이션에 현재 존재하는 KYC 세션과 일치하지 않는 `session_numbers` 항목(알 수 없는 번호, 이미 삭제된
        세션 또는 다른 애플리케이션 소유의 세션)은 **경고 없이 건너뜁니다**. 이 항목들은 `results`에 표시되지 않으며 작업의
        `total`에도 집계되지 않습니다.

        - 유효성 검사 실패(숫자가 아닌 항목, 빈 목록, `session_numbers`와 `delete_all`이 모두 제공되지 않은
        경우, 애플리케이션이 수용할 수 없는 템플릿 보존 설정 등)가 발생하면 **전체 요청**이 `400`으로 거부되고 아무것도
        삭제되지 않습니다.

        - 세션은 그룹 단위로 삭제됩니다. 스토리지 서비스를 사용할 수 없는 등의 이유로 그룹을 삭제할 수 없는 경우 해당 그룹의 모든
        세션은 `face_retention_outcome: failed_retryable`로 보고되고 유지되며, 다른 그룹은 영향을 받지
        않습니다. 해당 세션에 대해 요청을 다시 시도하십시오. 작업으로 실행되는 경우 이러한 그룹은 자동으로 재시도됩니다.

        - 목록 길이에 대한 문서화된 상한은 없으며, 아래의 공유 쓰기 속도 제한이 실질적인 한도입니다.


        **얼굴 생체 인식 데이터:** 선택적 필드인 `retain_face_embeddings`,
        `face_retention_days`, `face_retention_deadline`,
        `deletion_instruction`, `instruction_id`는 `DELETE
        /v3/session/{sessionId}/delete/`에서와 동일한 의미를 가지며 일치하는 모든 세션에 적용됩니다. 각 결과는
        자체 `face_retention_outcome`을 보고합니다.


        **응답:** 일치하는 세션이 최대 20개인 경우 `results[]`가 포함된 `200 OK`가 반환되고, 그 이상인 경우 삭제
        작업이 포함된 `202 Accepted`가 반환됩니다. `face_retention_outcome:
        failed_retryable`을 제외한 모든 결과는 삭제를 확인하며, 이는 삭제되지 않아 재시도해야 하는 세션을 보고합니다. 이
        endpoint의 이전 버전은 `204 No Content`를 반환했으므로, `204`를 검증하는 클라이언트를 업데이트하십시오.


        **멱등성:** 동일한 요청을 반복해도 추가로 삭제되지 않습니다. 더 이상 세션과 일치하지 않는 번호는 건너뜁니다.


        **`delete_all: true` (파괴적 작업):** 애플리케이션에 남아 있는 **모든** KYC 세션을 삭제합니다. 이
        옵션이 설정되면 `session_numbers`는 무시됩니다. 확인 단계가 없으며 실행 취소할 수 없습니다.


        **인증:** `x-api-key` 헤더의 API 키를 사용합니다. 자격 증명이 없거나 유효하지 않은 경우
        `403`(`{"detail": "You do not have permission to perform this
        action."}`)이 반환되며, 이 API는 `401`을 반환하지 않습니다.


        **속도 제한:** 모든 POST/PATCH/DELETE endpoint에서 API 키당 분당 300개의 요청으로 공유되는 쓰기
        예산이 적용되며, 초과 시 `429`가 반환됩니다.


        이 endpoint는 API 키만 허용합니다. 둘 다 허용하는 단일 세션 삭제와 달리 Business Console 사용자
        Bearer 토큰은 `403`으로 거부됩니다.


        **제출된 규제 보고서:** 선택한 데이터가 최종 확정된 규제 보고서에 포함되어 있는 경우 전체 요청이 `409`로 거부되고
        아무것도 삭제되지 않습니다. 본문은 `code: in_filed_report`를 사용하며 `uuid`,
        `report_number`, `report_type`, `case_uuid`로 각 보고서를 명시합니다. 보고서를 삭제한 후
        요청을 다시 시도하십시오.
      operationId: batch_delete_sessions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                session_numbers:
                  type: array
                  description: >-
                    삭제할 KYC 세션의 숫자 `session_number` 값(숫자 전용 문자열, JSON 숫자도 허용되며
                    변환됨)입니다. `delete_all`이 `true`가 아닌 한 필수이며, 빈 목록은 `400`을
                    반환합니다. 숫자가 아닌 항목이 있으면 전체 요청이 `400`으로 거부됩니다(`delete_all`이
                    `true`인 경우 유효성 검사를 건너뛰고 항목을 무시함). 애플리케이션의 라이브 세션과 일치하지 않는
                    번호는 알림 없이 건너뜁니다.
                  items:
                    type: string
                    pattern: ^[0-9]+$
                    example: '1001'
                  minItems: 1
                  example:
                    - '1001'
                    - '1002'
                    - '1003'
                delete_all:
                  type: boolean
                  description: >-
                    `true`인 경우 호출 애플리케이션의 나머지 모든 KYC 세션이 삭제되고 `session_numbers`는
                    무시됩니다(`filter_*` 키로 선택 항목을 좁히지 않는 한). 일치하는 세션이 20개를 초과하면 요청
                    전에 생성된 세션만 포함하는 삭제 작업(`202`)으로 실행됩니다. 기본값은 `false`입니다. 되돌릴 수
                    없으며 확인 단계가 없습니다.
                  default: false
                  example: false
                retain_face_embeddings:
                  type: boolean
                  nullable: true
                  description: >-
                    이번 삭제에 대해 애플리케이션의 `face_retention_policy`를 재정의합니다. `true`는
                    세션이 삭제된 후에도 세션의 사용자에 연결된 이미지가 없는 얼굴 생체 인식 템플릿 하나를 유지합니다.
                    `false`는 세션과 함께 얼굴 임베딩을 삭제합니다. 생략하거나 `null`로 설정하면 애플리케이션 정책을
                    따릅니다. KYB 세션 및 얼굴 임베딩이 없는 세션의 경우 무시됩니다.
                  example: true
                face_retention_days:
                  type: integer
                  minimum: 1
                  maximum: 3650
                  description: >-
                    보존된 템플릿의 유한 보존 기간(일 단위)입니다. 애플리케이션에서 이미
                    `face_retention_days`를 설정하지 않은 한 템플릿이 보존될 때 필수입니다. 템플릿의
                    `expires_at`은 이 기간, 애플리케이션의 일반 데이터 보존 기간, 그리고
                    `face_retention_deadline` 중 가장 빠른 시점으로 설정됩니다.
                  example: 365
                face_retention_deadline:
                  type: string
                  format: date-time
                  description: 보존된 템플릿의 선택적 강제 만료일입니다. 미래 시점이어야 합니다.
                  example: '2027-08-28T00:00:00Z'
                deletion_instruction:
                  type: string
                  enum:
                    - operational_session_delete
                    - privacy_erasure
                  default: operational_session_delete
                  description: >-
                    제공하는 지시의 유형입니다. `operational_session_delete`는 세션을 삭제하고 정책 또는
                    `retain_face_embeddings`에 명시된 경우에만 템플릿을 보존합니다.
                    `privacy_erasure`는 세션을 삭제하기 전에 세션의 사용자에 고정된 보존된 모든 생체 인식
                    템플릿을 제거하며, 애플리케이션 정책으로 재정의할 수 없고 `retain_face_embeddings:
                    true`와 함께 사용할 수 없습니다(`400`).
                  example: operational_session_delete
                instruction_id:
                  type: string
                  maxLength: 255
                  description: >-
                    이 삭제 지침에 대한 귀하의 영구 참조값입니다(예: 삭제 티켓 id). 감사 로그 및 보존되는 템플릿에
                    기록됩니다. 생략 시 Didit이 생성합니다.
                  example: dsar-2026-0142
                filter_status:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `status` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 쉼표로 구분된 문자열 또는 배열입니다.
                    `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                filter_vendor_data:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `vendor_data` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 목록이 아닌 단일 값입니다. 배열은
                    하나의 쉼표로 구분된 텍스트로 결합되므로 여러 값이 대체 항목으로 매칭되지 않습니다.
                    `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  type: string
                filter_search:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `search` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 목록이 아닌 단일 값입니다. 배열은 하나의
                    쉼표로 구분된 텍스트로 결합되므로 여러 값이 대체 항목으로 매칭되지 않습니다. `delete_all`이
                    없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  type: string
                filter_workflow_id:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `workflow_id` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 쉼표로 구분된 문자열 또는
                    배열입니다. `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                filter_date_from:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `date_from` 필터와 동일한 값을
                    갖는 세션으로 좁힙니다. 목록이 아닌 단일 값이어야 합니다. 배열은 쉼표로 구분된 하나의 값으로 결합되므로
                    여러 값을 전달하면 `400`으로 거부됩니다. `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며
                    대상 범위를 좁히지 않습니다.
                  type: string
                  format: date
                filter_date_to:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `date_to` 필터와 동일한 값을 갖는
                    세션으로 좁힙니다. 목록이 아닌 단일 값이어야 합니다. 배열은 쉼표로 구분된 하나의 값으로 결합되므로 여러
                    값을 전달하면 `400`으로 거부됩니다. `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 대상
                    범위를 좁히지 않습니다.
                  type: string
                  format: date
                filter_country:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `country` 필터와 동일한 값을 갖는
                    세션으로 좁힙니다. 쉼표로 구분된 문자열 또는 배열입니다. `delete_all`이 없으면 무시됩니다. 빈
                    값은 무시되며 대상 범위를 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                filter_document_type:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `document_type` 필터와 동일한
                    값을 갖는 세션으로 좁힙니다. 쉼표로 구분된 문자열 또는 배열입니다. `delete_all`이 없으면
                    무시됩니다. 빈 값은 무시되며 대상 범위를 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                filter_document_name:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `document_name` 필터와 동일한
                    값을 갖는 세션으로 좁힙니다. 쉼표로 구분된 문자열 또는 배열입니다. `delete_all`이 없으면
                    무시됩니다. 빈 값은 무시되며 대상 범위를 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                filter_region:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `region` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 쉼표로 구분된 문자열 또는 배열입니다.
                    `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                filter_didit_internal_id:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `didit_internal_id` 필터와
                    동일한 값을 갖는 세션으로 좁힙니다. 목록이 아닌 단일 값이어야 합니다. 배열은 쉼표로 구분된 하나의 값으로
                    결합되므로 여러 값을 전달하면 `400`으로 거부됩니다. `delete_all`이 없으면 무시됩니다. 빈
                    값은 무시되며 대상 범위를 좁히지 않습니다.
                  type: string
                  format: uuid
                filter_session_type:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `session_type` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 쉼표로 구분된 문자열 또는
                    배열입니다. `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                filter_api_service:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `api_service` 필터와 동일한
                    값을 갖는 세션으로 좁힙니다. 목록이 아닌 단일 값이어야 합니다. 배열은 쉼표로 구분된 하나의 값으로
                    결합되므로 여러 값을 전달하면 `400`으로 거부됩니다. `delete_all`이 없으면 무시됩니다. 빈
                    값은 무시되며 대상 범위를 좁히지 않습니다.
                  type: string
                filter_screened_full_name:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `screened_full_name` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 목록이 아닌 단일
                    값입니다. 배열은 하나의 쉼표로 구분된 텍스트로 결합되므로 여러 값이 대체 항목으로 매칭되지 않습니다.
                    `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  type: string
                filter_warning:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `warning` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 쉼표로 구분된 문자열 또는 배열입니다.
                    `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                filter_status_initialized_as_in_review:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `status_initialized_as_in_review` 필터와 일치하는 동일한 값의 세션으로 좁힙니다.
                    `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택 대상을 좁히지 않습니다.
                  type: boolean
                filter_is_kyc_to_be_reviewed:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `is_kyc_to_be_reviewed`
                    필터와 동일한 값을 갖는 세션으로 좁힙니다. `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며
                    대상 범위를 좁히지 않습니다.
                  type: boolean
                filter_euuid:
                  description: >-
                    `delete_all`의 대상 범위를 [세션
                    목록](/ko/sessions-api/list-sessions)의 `euuid` 필터와 동일한 값을 갖는
                    세션으로 좁힙니다. 목록이 아닌 단일 값이어야 합니다. 배열은 쉼표로 구분된 하나의 값으로 결합되므로 여러
                    값을 전달하면 `400`으로 거부됩니다. `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 대상
                    범위를 좁히지 않습니다.
                  type: string
                  format: uuid
                filter_organization_name:
                  description: >-
                    `delete_all` 대상을 [세션 목록 조회](/ko/sessions-api/list-sessions)의
                    `organization_name` 필터와 일치하는 동일한 값의 세션으로 좁힙니다. 쉼표로 구분된 문자열
                    또는 배열입니다. API 키를 사용할 경우 본인 조직의 이름과만 일치할 수 있으므로, 조직의 전체 세션을
                    선택하거나 아무것도 선택하지 않습니다. `delete_all`이 없으면 무시됩니다. 빈 값은 무시되며 선택
                    대상을 좁히지 않습니다.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
            examples:
              Specific sessions:
                summary: 번호별 특정 세션 삭제
                value:
                  session_numbers:
                    - '1001'
                    - '1002'
                    - '1003'
              All sessions:
                summary: 애플리케이션의 모든 KYC 세션 삭제
                value:
                  delete_all: true
              Delete and retain templates:
                summary: 세션을 삭제하되 이미지가 없는 생체 인식 템플릿은 365일간 유지
                value:
                  session_numbers:
                    - '1001'
                    - '1002'
                  retain_face_embeddings: true
                  face_retention_days: 365
                  instruction_id: post-approval-cleanup-2026-08
              Privacy erasure:
                summary: 세션을 삭제하고 해당 사용자에 대해 보존된 모든 템플릿 완전 삭제
                value:
                  session_numbers:
                    - '1001'
                  deletion_instruction: privacy_erasure
                  instruction_id: dsar-2026-0142
              Filtered delete_all:
                summary: 2026년 9월에 생성된 특정 워크플로의 모든 거부된 세션 삭제
                value:
                  delete_all: true
                  filter_status:
                    - Declined
                  filter_workflow_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  filter_date_from: '2026-09-01'
                  filter_date_to: '2026-09-30'
      responses:
        '200':
          description: >-
            요청에서 일치하여 처리된 세션은 최대 20개입니다. 일치하는 세션당 하나의 결과가 반환되며, 일치하는 항목이 없는 번호(알
            수 없거나 이미 삭제됨)는 건너뛰고 표시되지 않습니다. `face_retention_outcome`이
            `failed_retryable`인 경우를 제외하고 결과는 삭제를 확인합니다. 이 세션은 삭제되지 않았으므로 재시도해야
            합니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        session_id:
                          type: string
                          format: uuid
                          description: 삭제된 세션입니다.
                        session_number:
                          type: integer
                          nullable: true
                          description: 삭제된 세션의 번호입니다.
                        face_retention_outcome:
                          type: string
                          enum:
                            - retained_with_user
                            - deleted
                            - none
                            - ineligible_no_vendor_user
                            - failed_retryable
                          description: >-
                            세션의 얼굴 생체 인식 데이터에 대해 수행된 작업입니다. `deleted`: 얼굴 임베딩이
                            세션과 함께 삭제되었습니다(기본값). `retained_with_user`: 세션은 삭제되고
                            이미지가 포함되지 않은 생체 인식 템플릿 하나가 사용자에 연결된 상태로 유지됩니다.
                            `biometric_template_uuid`를 참조하세요. `none`: 세션에 얼굴
                            임베딩이 없었습니다(예: 라이브니스 셀피가 없는 문서 전용 KYC 세션. KYB 세션은 이
                            endpoint에서 선택되지 않습니다). `ineligible_no_vendor_user`:
                            보존이 요청되었으나 세션에 연결된 사용자가 없어 얼굴 임베딩이 세션과 함께 삭제되었습니다.
                            `failed_retryable`(배치 endpoint 전용): 이 세션과 함께 삭제되던
                            그룹을 삭제할 수 없었습니다(스토리지 서비스, 생체 인식 저장소 또는 모니터링 공급자를 사용할
                            수 없음). 이 세션은 그대로 유지되므로 요청을 재시도하세요.
                        biometric_template_uuid:
                          type: string
                          format: uuid
                          nullable: true
                          description: >-
                            `face_retention_outcome`이 `retained_with_user`일 때
                            보존된 생체 인식 템플릿의 ID입니다. 그 외의 경우 `null`입니다.
                            `/v3/biometric-templates/{template_uuid}/`를 통해
                            관리합니다.
                        biometric_template_expires_at:
                          type: string
                          format: date-time
                          nullable: true
                          description: >-
                            `face_retention_outcome`이 `retained_with_user`일 때
                            보존된 생체 인식 템플릿이 삭제되는 시점입니다. 템플릿이 보존되지 않은 경우
                            `null`입니다.
                        deleted_child_verifications:
                          type: integer
                          description: >-
                            KYC 세션만 삭제하는 이 endpoint에서는 항상 `0`입니다. `DELETE
                            /v3/session/{sessionId}/delete/`로 기업 확인(KYB) 세션을
                            삭제하면 해당 세션이 생성하여 함께 삭제된 인증 건수가 보고됩니다.
              examples:
                Mixed outcomes:
                  value:
                    results:
                      - session_id: 4c5c7f3a-3b1d-4b7e-9c39-2b4f7e6a1d02
                        session_number: 1001
                        face_retention_outcome: deleted
                        biometric_template_uuid: null
                        biometric_template_expires_at: null
                        deleted_child_verifications: 0
                      - session_id: b8e1d2c3-4f5a-4b6c-8d7e-9f0a1b2c3d4e
                        session_number: 1002
                        face_retention_outcome: retained_with_user
                        biometric_template_uuid: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
                        biometric_template_expires_at: '2027-10-09T10:15:00Z'
                        deleted_child_verifications: 0
                      - session_id: 7a1e9c2d-5f4b-4c3a-8e2d-1b0a9f8e7d6c
                        session_number: 1003
                        face_retention_outcome: ineligible_no_vendor_user
                        biometric_template_uuid: null
                        biometric_template_expires_at: null
                        deleted_child_verifications: 0
                      - session_id: c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f
                        session_number: 1004
                        face_retention_outcome: failed_retryable
                        biometric_template_uuid: null
                        biometric_template_expires_at: null
                        deleted_child_verifications: 0
        '202':
          description: >-
            20개를 초과하는 세션이 일치했습니다. 백그라운드에서 삭제됩니다. `status`가 `COMPLETED` 또는
            `FAILED`가 될 때까지 `GET /v3/sessions/delete/{job_id}/`를 폴링하세요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDeletionJob'
              examples:
                Job accepted:
                  value:
                    job_id: 5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b
                    status: PENDING
                    total: 250
                    processed: 0
                    outcomes:
                      deleted: 0
                      none: 0
                      retained_with_user: 0
                      ineligible_no_vendor_user: 0
                      failed_retryable: 0
                      already_deleted: 0
                    deleted_child_verifications: 0
                    error: null
                    created_at: '2026-10-09T10:15:00Z'
                    completed_at: null
        '400':
          description: 검증 오류 — 아무것도 삭제되지 않았습니다. 오류 값은 필드 이름을 키로 하는 메시지 문자열 배열입니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  session_numbers:
                    type: array
                    items:
                      type: string
                additionalProperties:
                  description: >-
                    기타 키: List Sessions 필터가 아닌 `filter_*` 키(`"Unknown
                    filter."`), 또는 값을 읽을 수 없는 `filter_*` 키(해당 `filter_*` 키를 키로
                    하고 메시지 배열을 포함).
              examples:
                Missing selector:
                  summary: session_numbers와 delete_all이 모두 제공되지 않았습니다
                  value:
                    session_numbers:
                      - This field is required unless delete_all is true.
                Empty list:
                  summary: session_numbers가 빈 배열입니다
                  value:
                    session_numbers:
                      - This list may not be empty.
                Non-numeric entry:
                  summary: session_numbers에 숫자가 아닌 문자열이 포함되어 있습니다
                  value:
                    session_numbers:
                      - All session_numbers must be numeric.
                Privacy erasure cannot retain:
                  summary: >-
                    deletion_instruction privacy_erasure가 retain_face_embeddings
                    true와 결합되었습니다
                  value:
                    retain_face_embeddings:
                      - Privacy erasure cannot retain biometric templates.
                No finite retention duration:
                  summary: 요청 또는 애플리케이션에 face_retention_days 없이 보존이 요청됨
                  value:
                    detail: >-
                      A finite biometric-template retention duration is
                      required.
                Unknown filter:
                  summary: List Sessions에 없는 filter_* 키
                  value:
                    filter_reviewer: Unknown filter.
                Unreadable filter value:
                  summary: 읽을 수 없는 필터 값
                  value:
                    filter_date_from:
                      - Enter a valid date.
        '403':
          description: >-
            API 키가 누락되었습니다. 키가 누락되면 `403`을 반환하고, 잘못되었거나 취소되었거나 만료된 키는 `401`을
            반환합니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Missing or invalid API key:
                  summary: x-api-key 헤더가 없거나 키가 유효하지 않습니다
                  value:
                    detail: You do not have permission to perform this action.
        '409':
          description: 선택한 세션이 확정된 규제 보고서에 포함되어 있습니다. 아무것도 삭제되지 않습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InFiledReportError'
        '429':
          description: >-
            공유 쓰기 속도 제한을 초과했습니다(API 키당 분당 300개의 POST/PATCH/DELETE 요청). 재시도하기 전에
            `Retry-After` 및 `X-RateLimit-*` 응답 헤더를 확인하세요.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Rate limited:
                  summary: 쓰기 예산 소진됨
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      requests per minute.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST \
              https://verification.didit.me/v3/sessions/delete/ \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "session_numbers": ["1001", "1002", "1003"]
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.batch_delete(
                session_numbers=["1001", "1002", "1003"],
            )
            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.sessions.batchDelete({
              session_numbers: ["1001", "1002", "1003"],
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.BatchDelete(ctx, didit.SessionsBatchDeleteParams{\n\tSessionNumbers: didit.Some([]string{\"1001\", \"1002\", \"1003\"}),\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.SessionsBatchDeleteParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().batchDelete(SessionsBatchDeleteParams.builder()
                    .sessionNumbers(List.of("1001", "1002", "1003"))
                    .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->sessions->batchDelete([
                'session_numbers' => ['1001', '1002', '1003'],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result = didit.sessions.batch_delete(session_numbers: ["1001",
            "1002", "1003"])

            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.Sessions.BatchDeleteAsync(new
            SessionsBatchDeleteParams

            {
                SessionNumbers = new string[] { "1001", "1002", "1003" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    SessionDeletionJob:
      type: object
      description: '백그라운드에서 실행 중인 대량 세션 삭제: 진행 상황과 결과별 건수이며, 삭제된 세션 목록은 포함되지 않습니다.'
      properties:
        job_id:
          type: string
          format: uuid
          description: 이 id로 `GET /v3/sessions/delete/{job_id}/`를 폴링하십시오.
        status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
          description: >-
            `PENDING`: 접수되었으며 아직 시작되지 않음. `PROCESSING`: 삭제 중이며 `processed` 및
            `outcomes`가 업데이트되는 중임. `COMPLETED`: 선택한 모든 세션이 처리됨. `FAILED`: 작업이 조기
            중단됨. `error`를 참조하십시오.
        total:
          type: integer
          description: 삭제 요청 시 선택된 세션입니다.
        processed:
          type: integer
          description: 작업이 지금까지 처리를 완료한 세션입니다.
        outcomes:
          type: object
          description: 각 결과로 종료된 세션 수입니다. 모든 키는 항상 존재합니다.
          properties:
            deleted:
              type: integer
              description: 얼굴 임베딩과 함께 삭제된 세션입니다.
            none:
              type: integer
              description: 얼굴 임베딩이 없어 삭제된 세션입니다.
            retained_with_user:
              type: integer
              description: >-
                요청 또는 애플리케이션 정책에 따라 사용자를 위한 이미지 없는 생체 인식 템플릿 1개가 보존되는 동안 삭제된
                세션입니다.
            ineligible_no_vendor_user:
              type: integer
              description: 보존이 요청되었으나 연결된 사용자가 없어 얼굴 임베딩과 함께 삭제된 세션입니다.
            failed_retryable:
              type: integer
              description: 삭제되지 않은 것으로 보고된 세션입니다. 작업은 자체적으로 삭제하지 못한 그룹을 여기에 집계하는 대신 재시도합니다.
            already_deleted:
              type: integer
              description: 작업이 도달했을 때 다른 요청 등에 의해 이미 삭제된 선택된 세션입니다.
        deleted_child_verifications:
          type: integer
          description: >-
            삭제된 기업 인증에서 생성되어 함께 삭제된 인증 건수입니다. KYC 세션만 삭제하는 `POST
            /v3/sessions/delete/`로 시작된 작업의 경우 항상 `0`입니다.
        error:
          type: string
          nullable: true
          description: >-
            `status`가 `FAILED`가 아닌 한 `null`이며, 이때 삭제가 중단된 이유가 표시됩니다. 작업이 도달하지 않은
            세션은 그대로 유지되므로 요청을 다시 실행하여 삭제하십시오.
        created_at:
          type: string
          format: date-time
          description: 삭제가 요청된 시점입니다.
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: 작업이 완료된 시점입니다. 실행 중일 때는 `null`입니다.
    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: '콘솔에 표시되는 보고서 번호(예: 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: >-
        Business Console의 Developers -> API keys에서 발급받은 귀하 애플리케이션의 API 키입니다. 기본
        키는 전체 접근 권한을 갖습니다. 이름이 지정된 키는 리소스별 none, read, write 범위로 권한을 제한할 수 있으며
        특정 워크플로나 승인된 세션, IP 주소 목록, 만료일 등으로 제한할 수도 있습니다. 401은 키가 잘못되었거나 폐기되었거나
        만료되었음을 의미합니다. 403은 키가 전송되지 않았거나, 키에 해당 리소스나 작업에 대한 접근 권한이 없거나, 요청이 허용된
        IP 목록 외부 주소에서 발생했음을 의미합니다. 세션 경로에서의 404는 해당 세션이 키의 허용 워크플로 또는 상태 범위를
        벗어났음을 의미합니다. 미디어 접근 권한이 없는 키는 이미지, 비디오, PDF URL을 null로 수신하며, 세션 write
        권한이 없는 키는 세션 링크와 token을 null로 수신합니다.
        https://docs.didit.me/console/api-keys 를 참고하십시오.

````

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