> ## 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：解除会话项屏蔽

> 通过 POST /v3/blocklist/remove/，一次调用即可解除 Didit 验证会话中人脸、证件、电话号码或邮箱的黑名单屏蔽。



从黑名单中移除 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Lift the block on the face, document, phone number or email address of one of my Didit verification sessions through the Management API.

Endpoint:
POST https://verification.didit.me/v3/blocklist/remove/

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

Goal:
\- Undo a blocklist decision for a session, for example after a false positive.

Request body (application/json):
\{
"session_id": "33333333-4444-5555-6666-777777777777", // required: a verification session of my application
"unblock_face": true,       // optional, default false
"unblock_document": true,   // optional, default false
"unblock_phone": false,     // optional, default false
"unblock_email": false      // optional, default false
}
At least one unblock_* flag must be true.

Behavior:
\- Didit uses the session's most recent record of each selected type.
\- The record is no longer flagged as blocklisted, and the system blocklist entries created from it are deleted, so it no longer declines new sessions.
\- Entries added by value are not touched: if the same phone number was also added to the phone blocklist by hand, it stays blocked until I delete that entry with DELETE /v3/lists/{list_uuid}/entries/{entry_uuid}/.
\- Unblocking a record that is not blocklisted succeeds and changes nothing.
\- Sessions that already finished are not changed.

Example call:
curl -X POST "https://verification.didit.me/v3/blocklist/remove/" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"session_id": "33333333-4444-5555-6666-777777777777", "unblock_face": true, "unblock_document": true}'

Example response (200):
\{ "message": "Successfully removed from blocklist." }

Failure modes:
\- 400: session_id is missing ({ "session_id": ["This field is required."] }) or not a UUID ({ "session_id": ["Must be a valid UUID."] }); the session is not a verification session of this application ({ "non_field_errors": ["Session not found"] }; business verification sessions are not accepted); no flag is true ({ "non_field_errors": ["Must specify at least one item to unblock"] }); or the session has no record of a selected type ({ "non_field_errors": ["Session does not have an email record"] }).
\- 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.
\- 429: rate limited (see /integration/rate-limiting); back off and retry.

Side effects:
\- Deletes the matching entries from the system face, document, phone and email blocklists.

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

\</pre>



      
      

粘贴到

解除对单次验证会话所收集内容的拦截，包括其人脸、身份证件、电话号码或邮箱地址。该记录将不再被标记为已列入黑名单，由它生成的系统黑名单条目也会被删除，因此不会再拒绝新的会话。> [!NOTE]
>
> 只会删除由该会话记录生成的条目。手动添加到名单中的值（例如在电话黑名单中手动输入的同一电话号码）仍会被拦截：请使用[列出条目](https://docs.didit.me/zh/management-api/lists/list-entries.md)查找，并使用[删除条目](https://docs.didit.me/zh/management-api/lists/delete-entry.md)将其删除。要查看当前被拦截的内容，请使用[列出已列入黑名单的项目](https://docs.didit.me/zh/management-api/blocklist/list.md)。关于在管理控制台中管理黑名单，请参阅[黑名单用户](https://docs.didit.me/zh/console/blocklist-users.md)。


## OpenAPI

````yaml zh/openapi-25.json POST /v3/blocklist/remove/
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/blocklist/remove/:
    post:
      tags:
        - Blocklist
      summary: 从黑名单中移除会话条目
      description: >-
        解除对应用中某个人员验证会话的人脸、身份证件、电话号码或邮箱地址的阻止。针对每个选定的类型，Didit
        会获取该会话的最新记录，清除其黑名单标记，并删除根据该记录创建的系统黑名单条目，使其不再导致新会话被拒绝。按值添加到列表中的条目不会受到影响：可以通过
        [List list
        entries](https://docs.didit.me/zh/management-api/lists/list-entries)
        查询它们，并通过 [Delete a list
        entry](https://docs.didit.me/zh/management-api/lists/delete-entry)
        删除它们。取消阻止未列入黑名单的记录会返回成功且不更改任何内容，已经结束的会话不会被修改。限定作用域的 API 密钥需要 `workflows:
        write` 权限。
      operationId: remove_from_blocklist
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - session_id
              description: 至少一个 `unblock_*` 标志必须为 `true`。
              properties:
                session_id:
                  type: string
                  format: uuid
                  description: 您应用的个人验证会话。已删除的会话会被拒绝。
                unblock_face:
                  type: boolean
                  default: false
                  description: 解除对该会话人脸的阻止。
                unblock_document:
                  type: boolean
                  default: false
                  description: 解除对该会话身份证件的阻止。
                unblock_phone:
                  type: boolean
                  default: false
                  description: 解除对该会话电话号码的阻止。
                unblock_email:
                  type: boolean
                  default: false
                  description: 解除对该会话邮箱地址的阻止。
            examples:
              Face and document:
                value:
                  session_id: 33333333-4444-5555-6666-777777777777
                  unblock_face: true
                  unblock_document: true
      responses:
        '200':
          description: 所选项的封禁已被解除。
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
                    description: 始终为 `Successfully removed from blocklist.`
              examples:
                Unblocked:
                  value:
                    message: Successfully removed from blocklist.
        '400':
          description: 请求体无效、会话不是该应用的验证会话，或者不包含所选类型的记录。未更改任何内容。
          content:
            application/json:
              examples:
                Unknown session:
                  value:
                    non_field_errors:
                      - Session not found
                No item selected:
                  value:
                    non_field_errors:
                      - Must specify at least one item to unblock
                No email record:
                  value:
                    non_field_errors:
                      - Session does not have an email record
                Invalid session id:
                  value:
                    session_id:
                      - Must be a valid UUID.
                Missing session id:
                  value:
                    session_id:
                      - This field is required.
        '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.
        '429':
          $ref: '#/components/responses/RateLimitedWrite'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST 'https://verification.didit.me/v3/blocklist/remove/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "session_id": "33333333-4444-5555-6666-777777777777",
                "unblock_face": true,
                "unblock_document": true
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.blocklist.remove(
                session_id="33333333-4444-5555-6666-777777777777",
                unblock_face=True,
                unblock_document=True,
            )
            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.blocklist.remove({
              session_id: "33333333-4444-5555-6666-777777777777",
              unblock_face: true,
              unblock_document: true,
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Blocklist.Remove(ctx, didit.BlocklistRemoveParams{\n\tSessionID:       \"33333333-4444-5555-6666-777777777777\",\n\tUnblockFace:     didit.Bool(true),\n\tUnblockDocument: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.BlocklistRemoveParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.blocklist().remove(BlocklistRemoveParams.builder()
                    .sessionId("33333333-4444-5555-6666-777777777777")
                    .unblockFace(true)
                    .unblockDocument(true)
                    .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->blocklist->remove([
                'session_id' => '33333333-4444-5555-6666-777777777777',
                'unblock_face' => true,
                'unblock_document' => true,
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.blocklist.remove(
              session_id: "33333333-4444-5555-6666-777777777777",
              unblock_face: true,
              unblock_document: true
            )
            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.Blocklist.RemoveAsync(new
            BlocklistRemoveParams

            {
                SessionId = "33333333-4444-5555-6666-777777777777",
                UnblockFace = true,
                UnblockDocument = true,
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
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.