> ## 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：移除合规名单

> DELETE /v3/lists/{list_uuid}/：从 Didit 应用中删除白名单或自定义名单及其条目。系统名单无法删除。



删除名单 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Delete an allowlist or custom list from my Didit application through the Management API.

Endpoint:
DELETE https://verification.didit.me/v3/lists/{list_uuid}/

Authentication:
Use the x-api-key header with my Didit API key. A scoped API key needs workflows: write.

Goal:
\- Delete an allowlist or custom list that I no longer need, together with its entries.
\- System lists (is_system: true) cannot be deleted; the API answers 400.

Path parameter:
\- list_uuid: the list UUID returned by GET /v3/lists/ or POST /v3/lists/.

Important semantics:
\- Returns 204 No Content with an empty body on success.
\- The list no longer appears in any read and its entries can no longer be listed.
\- Workflow and transaction rule conditions that reference the list (value_type: "list") evaluate it as an empty list from then on. Audit them before deleting.
\- Deletion is irreversible. The name can be reused for a new list.
\- Calling DELETE again on the same list_uuid returns 404.

Example call:
curl -X DELETE "https://verification.didit.me/v3/lists/{list_uuid}/" \
-H "x-api-key: YOUR_API_KEY"

Failure modes:
\- 400: the list is a system list ({ "detail": "System lists cannot be deleted." }).
\- 401: the API key has expired.
\- 403: missing x-api-key (a wrong, revoked or expired key gets 401) ({ "detail": "You do not have permission to perform this action." }), or a scoped key without workflows: write.
\- 404: no list with this UUID in this application, or it was already deleted.
\- 429: rate limited (see /integration/rate-limiting); back off and retry.

Side effects:
\- The list and its entries are deleted.

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

粘贴到

删除白名单或自定义名单及其所有条目。该名单将不再出现在任何读取操作中，引用它的工作流和交易规则条件会将其视为空列表。删除操作不可撤销。系统名单（黑名单、**High Risk Countries** 名单和系统白名单）无法删除，请求将返回 `400`。如需清空系统名单，请逐条[删除其条目](https://docs.didit.me/zh/management-api/lists/delete-entry.md)。


## OpenAPI

````yaml zh/openapi-25.json DELETE /v3/lists/{list_uuid}/
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/lists/{list_uuid}/:
    delete:
      tags:
        - Lists
      summary: 删除名单
      description: >-
        删除白名单或自定义名单及其条目。删除操作不可逆：该名单及其条目将不再出现在任何读取操作中，引用该名单的工作流和交易规则条件此后将把其视为空名单进行评估。已完成评估的会话和交易将保留其结果，该名称可重新用于新名单。系统名单无法删除，会返回
        `400`；如需清空系统名单，请[删除其条目](https://docs.didit.me/zh/management-api/lists/delete-entry)。限定权限的
        API 密钥需要具备 `workflows: write` 权限。
      operationId: delete_list
      parameters:
        - name: list_uuid
          in: path
          required: true
          description: 列表的 UUID，如列出列表或创建列表所返回。
          schema:
            type: string
            format: uuid
          example: 11111111-2222-3333-4444-555555555555
      responses:
        '204':
          description: 名单及其条目已被删除。无响应体。
        '400':
          description: 该名单为系统名单。
          content:
            application/json:
              examples:
                System list:
                  value:
                    detail: System lists cannot be deleted.
        '401':
          description: 作用域 API 密钥已过期。其他身份验证失败将返回 `403`。
          content:
            application/json:
              examples:
                Expired API key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            缺少 `x-api-key` 请求头（错误、已撤销或已过期的密钥会返回 `401`），或者限定权限的 API 密钥缺少
            `workflows: write`，抑或是从其允许名单之外的 IP 地址使用。
          content:
            application/json:
              examples:
                Missing or invalid API key:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without workflows access:
                  value:
                    detail: This API key has no write access to workflows.
        '404':
          description: API 密钥所属的应用中不存在具有此 UUID 的列表，或者已被删除。
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: No List matches the given query.
        '429':
          $ref: '#/components/responses/RateLimitedWrite'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X DELETE
            'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            client.lists.delete(
                "11111111-2222-3333-4444-555555555555",
            )
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

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

            await didit.lists.delete("11111111-2222-3333-4444-555555555555");
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Lists.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: |-
            import me.didit.Didit;

            // Reads DIDIT_API_KEY.
            Didit client = new Didit();

            client.lists().delete("11111111-2222-3333-4444-555555555555");
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

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

            $didit->lists->delete('11111111-2222-3333-4444-555555555555');
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            didit.lists.delete("11111111-2222-3333-4444-555555555555")
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            await
            client.Lists.DeleteAsync("11111111-2222-3333-4444-555555555555");
components:
  responses:
    RateLimitedWrite:
      description: 已超出每个 API 密钥每分钟 300 次请求的共享写入限制。在重试之前请遵循 `Retry-After`。
      content:
        application/json:
          schema:
            type: object
            required:
              - detail
            properties:
              detail:
                type: string
          example:
            detail: >-
              Write request rate limit exceeded. You can make up to 300 requests
              per minute.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

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