> ## 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：黑名单与白名单

> 通过 GET /v3/lists/ 获取 Didit 应用的全部黑名单、白名单和自定义名单。可按名单类型或条目类型筛选。按调用付费，无需签约。



列出名单 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Retrieve every blocklist, allowlist, and custom list in my Didit application through the Management API.

Endpoint:
GET https://verification.didit.me/v3/lists/

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

Goal:
\- Get a paginated list of all lists for my application so I can find a specific list's uuid, filter by type, or render a picker.

Behavior:
\- Returns the application's active lists, newest first by default. Deleted lists never appear.
\- Includes the system lists Didit provisions (is_system: true): one blocklist per entry type, the "High Risk Countries" custom list, and any system allowlist.
\- Paginated with limit (default 50) and offset. Follow next until it is null.

Query parameters (all optional):
\- list_type: "blocklist" | "allowlist" | "custom".
\- entry_type: face, document, phone, email, ip_address, device_fingerprint, wallet_address, bank_account, country, user, business, key.
\- ordering: created_at or -created_at (default).
\- limit: page size (default 50, at most 1000000).
\- offset: pagination offset (default 0).

Example call:
curl -X GET "https://verification.didit.me/v3/lists/?list_type=blocklist" \
-H "x-api-key: YOUR_API_KEY"

What to read from the response:
\- count / next / previous: standard pagination envelope.
\- results[].uuid: list id; use it as list_uuid in the list and entry calls.
\- results[].is_system: true for the lists Didit provisions. System lists cannot be renamed, edited or deleted, but you can add and remove their entries.
\- results[].entry_count, last_entry_added_at: computed over the list's current entries; useful for dashboards.

Failure modes:
\- 400: an unknown list_type or entry_type value, or limit/offset above 1000000.
\- 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: read.
\- 429: rate limited (see /integration/rate-limiting); back off and retry.

Side effects: none. This is a pure read.

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

\</pre>



      
      

粘贴到

检索您应用中所有处于活跃状态的名单，并分页返回。结果包括 Didit 预置的系统名单（每种条目类型对应一个黑名单、**High Risk Countries** 名单，以及任何系统白名单），也包括您创建的白名单和自定义名单。您可以按 `list_type` 或 `entry_type` 进行筛选，并通过 [名单条目](https://docs.didit.me/zh/management-api/lists/list-entries.md) 读取某个名单中的值。关于各类名单在验证和交易筛查中的作用，请参阅 [名单](https://docs.didit.me/zh/management-api/lists/overview.md)。


## OpenAPI

````yaml zh/openapi-25.json GET /v3/lists/
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/:
    get:
      tags:
        - Lists
      summary: 列出名单
      description: >-
        按由新到旧的顺序返回应用的名单：Didit 预配的系统名单（每种条目类型一个黑名单、**High Risk Countries**
        自定义名单以及任何系统白名单）以及您创建的白名单和自定义名单。使用 `list_type` 和 `entry_type`
        进行过滤；已删除的名单绝不会显示。结果通过 `limit` 和 `offset` 进行分页。作用域 API 密钥需要 `workflows:
        read`
        权限。有关每种名单类型的作用，请参阅[名单](https://docs.didit.me/zh/management-api/lists/overview)。
      operationId: list_lists
      parameters:
        - name: list_type
          in: query
          required: false
          description: 仅包含此类型的列表。
          schema:
            type: string
            enum:
              - blocklist
              - allowlist
              - custom
        - name: entry_type
          in: query
          required: false
          description: 仅包含此条目类型的列表。
          schema:
            type: string
            enum:
              - face
              - document
              - phone
              - email
              - ip_address
              - device_fingerprint
              - wallet_address
              - bank_account
              - country
              - user
              - business
              - key
        - name: ordering
          in: query
          required: false
          description: 排序顺序：`-created_at`（从新到旧，默认值）或 `created_at`（从旧到新）。
          schema:
            type: string
            enum:
              - '-created_at'
              - created_at
            default: '-created_at'
        - name: limit
          in: query
          required: false
          description: 页面大小。默认为 50。大于 1000000 的值返回 `400`；0、负数或非数字值将回退为 50。
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 1000000
        - name: offset
          in: query
          required: false
          description: 要返回的第一项的从零开始的索引。建议跟随 `next`。大于 1000000 的值将返回 `400`；负数或非数字值将回退为 0。
          schema:
            type: integer
            maximum: 1000000
            minimum: 0
            default: 0
      responses:
        '200':
          description: 一页列表。
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - next
                  - previous
                  - results
                properties:
                  count:
                    type: integer
                    minimum: 0
                    description: 符合过滤条件的名单总数。
                  next:
                    type: string
                    format: uri
                    nullable: true
                    description: 下一页的绝对 URL，最后一页则为 `null`。
                  previous:
                    type: string
                    format: uri
                    nullable: true
                    description: 上一页的绝对 URL，第一页则为 `null`。
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/ComplianceList'
              examples:
                Lists:
                  value:
                    count: 2
                    next: null
                    previous: null
                    results:
                      - uuid: 22222222-3333-4444-5555-666666666666
                        name: Trusted office IPs
                        description: Office egress ranges
                        list_type: allowlist
                        entry_type: ip_address
                        is_system: false
                        entry_count: 3
                        last_entry_added_at: '2026-10-02T08:15:27.501334Z'
                        created_at: '2026-09-30T13:20:45.889120Z'
                        updated_at: '2026-09-30T13:20:45.889120Z'
                      - uuid: 11111111-2222-3333-4444-555555555555
                        name: Face Blocklist
                        description: >-
                          Blocked biometric faces. When a face matching an entry
                          in this list is detected during liveness verification,
                          the session will be automatically declined.
                        list_type: blocklist
                        entry_type: face
                        is_system: true
                        entry_count: 12
                        last_entry_added_at: '2026-10-09T16:42:03.118204Z'
                        created_at: '2026-01-14T10:02:11.402917Z'
                        updated_at: '2026-01-14T10:02:11.402917Z'
        '400':
          description: 查询参数无效。
          content:
            application/json:
              examples:
                Unknown list type:
                  value:
                    list_type:
                      - '"denylist" is not a valid choice.'
                Unsupported ordering:
                  value:
                    ordering:
                      - '"name" is not a valid choice.'
                Limit too large:
                  value:
                    - limit must not exceed 1000000.
        '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: read`，抑或是从其允许名单之外的 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 read access to workflows.
        '429':
          description: 已超出每个 API 密钥每分钟 600 次请求的共享读取限制。在重试之前请遵循 `Retry-After`。
          content:
            application/json:
              examples:
                Rate limited:
                  value:
                    detail: >-
                      GET request rate limit exceeded. You can make up to 600
                      requests per minute.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/lists/?list_type=blocklist' \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            for item in client.lists.list():
                print(item)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

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

            for await (const item of didit.lists.list()) {
              console.log(item);
            }
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Lists.ListAutoPaging(ctx, didit.ListsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: |-
            import me.didit.Didit;

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

            for (var item : client.lists().list()) {
                System.out.println(item);
            }
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

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

            foreach ($didit->lists->list() as $item) {
                print_r($item->toArray());
            }
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            didit.lists.list.auto_paging_each do |item|
              puts item.to_h
            end
        - lang: csharp
          label: .NET
          source: |-
            using System;
            using System.Text.Json;
            using Didit;

            // Reads DIDIT_API_KEY.
            using var client = new DiditClient();

            await foreach (var item in await client.Lists.ListAsync())
            {
                Console.WriteLine(JsonSerializer.Serialize(item));
            }
components:
  schemas:
    ComplianceList:
      type: object
      description: 某个应用的黑名单、白名单或自定义名单。
      required:
        - uuid
        - name
        - description
        - list_type
        - entry_type
        - is_system
        - entry_count
        - last_entry_added_at
        - created_at
        - updated_at
      properties:
        uuid:
          type: string
          format: uuid
          description: >-
            名单标识符。在名单和条目 endpoint 中用作 `list_uuid`，并在带有 `value_type: "list"`
            的工作流或交易规则条件中用作值。
        name:
          type: string
          maxLength: 255
          description: 名单名称，在应用的各个名单中具有唯一性。
        description:
          type: string
          description: 自由文本描述。未设置时为空字符串。
        list_type:
          type: string
          enum:
            - blocklist
            - allowlist
            - custom
          description: >-
            `blocklist`：匹配会拒绝会话或交易（仅限系统名单，每种条目类型一个）。`allowlist`：匹配的项目受信任，例如人脸白名单会跳过重复人脸操作；绝不会覆盖黑名单匹配。`custom`：用于工作流和交易规则条件（`value_type:
            "list"`）。
        entry_type:
          type: string
          enum:
            - face
            - document
            - phone
            - email
            - ip_address
            - device_fingerprint
            - wallet_address
            - bank_account
            - country
            - user
            - business
            - key
          description: >-
            该名单包含的内容：`face`、`document`（证件号码）、`phone`、`email`、`ip_address`（地址或
            CIDR
            范围）、`device_fingerprint`、`wallet_address`、`bank_account`、`country`（ISO
            3166-1 alpha-3）、`user` 或 `business`（您的 `vendor_data`），或
            `key`（任意字符串）。它决定了条目值的验证和匹配方式。
        is_system:
          type: boolean
          description: >-
            `true` 表示由 Didit
            预配的名单：每种条目类型一个黑名单（`face`、`document`、`phone`、`email`、`ip_address`、`device_fingerprint`、`wallet_address`、`bank_account`、`user`、`business`）、**High
            Risk Countries** 自定义名单以及系统白名单。系统名单无法重命名、编辑或删除；您可以添加和删除其中的条目。
        entry_count:
          type: integer
          minimum: 0
          description: 当前列表中条目的数量。
        last_entry_added_at:
          type: string
          format: date-time
          nullable: true
          description: 添加最新当前条目的时间。名单为空时为 `null`。
        created_at:
          type: string
          format: date-time
          description: 名单创建时间。
        updated_at:
          type: string
          format: date-time
          description: 名单最后更新时间。
  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.