> ## 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：通过与拒绝

> Didit 提供 PATCH /v3/session/{id}/update-status/ 接口，可将会话设为通过、拒绝或审核中，适用于 KYC 和 KYB。按量计费，无月度最低消费。



更新会话状态提示
        将提示词复制到剪贴板



      
      

\<pre>

\`Manually approve, decline, or re-open a Didit verification session.

Endpoint:
PATCH https://verification.didit.me/v3/session/{session_id}/update-status/

Authentication:
Use the x-api-key header with your Didit API key (or a user-auth token). Privilege: write:sessions.

Path parameter:
\- session_id (UUID) — KYC or KYB; Didit resolves it against both session types.

Request body:
\- new_status (string, required) — One of "Approved", "Declined", "Resubmitted". Any other value is rejected.
\- comment (string, optional) — Free-text note saved on the audit trail (visible in the Console review log).
\- nodes_to_resubmit (array, required when new_status="Resubmitted") — Which feature steps the user must redo. Each entry: { "node_id": "feature_poa_1", "feature": "POA" }. KYB-only nodes "KYB_REGISTRY" and "KYB_KEY_PEOPLE" cannot be resubmitted directly (the parent recomputes from child KYCs).
\- send_email (boolean, optional, default false): if true, email the person. "Approved" and "Declined" send their decision email; "Resubmitted" sends a fresh hosted link with the reasons.
\- email_address (string, required when send_email=true).
\- email_language (string, optional, default "en") — ISO 639-1.
\- email_preview_token (string, optional): the preview_token from Preview Decision Email ("Approved", "Declined") or Preview Resubmission Email ("Resubmitted"). Only valid with send_email=true; without it the request returns 400 { "email_preview_token": ["A preview receipt is only valid when the email is sent."] }. The update then sends exactly the previewed email, or returns 409 before changing anything if the email or the session changed since the preview.

Optional preview step (all three statuses):
1\. Preview the email. Neither call changes the session or sends anything.
\- Approved or Declined: POST https://verification.didit.me/v3/session/{session_id}/decision-email-preview/ with { "new_status": "Approved", "email_language": "en" } (see /sessions-api/preview-decision-email).
\- Resubmitted: POST https://verification.didit.me/v3/session/{session_id}/resubmission-preview/ with { "nodes_to_resubmit": [...], "email_language": "en" } (see /sessions-api/preview-resubmission). email_address is optional there; without it the email goes to the person's own address.
2\. Check subject, html, recipient, will_be_sent and not_sent_reason in the response.
3\. Confirm here with the same new_status (and the same nodes_to_resubmit for Resubmitted), send_email=true, email_address=<recipient>, email_language=<the language you previewed>, email_preview_token=<preview_token>.
The receipt expires after 15 minutes.

Allowed transitions:
Current status must be one of: Approved, Declined, In Review, Kyc Expired, Abandoned, Resubmitted. Otherwise the API returns 400 { "detail": "Only sessions with status Approved, Declined, In Review, Kyc Expired, Abandoned, Resubmitted can be updated. Current status: ..." }.
Setting "Approved" or "Declined" on a session that already has that status is a no-op: 200, nothing changes, and no webhook or email goes out. Setting "Resubmitted" on a session that is already Resubmitted returns 400 ["The new status is the same as the current status."].

curl example — approve after manual review:
curl -X PATCH https://verification.didit.me/v3/session/<SESSION_ID>/update-status/ \
-H "x-api-key: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"new_status": "Approved",
"comment": "Cleared after compliance review."
}'

curl example: approve and send the email you previewed:
curl -X PATCH https://verification.didit.me/v3/session/<SESSION_ID>/update-status/ \
-H "x-api-key: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"new_status": "Approved",
"send_email": true,
"email_address": "<recipient from the preview>",
"email_language": "en",
"email_preview_token": "<preview_token from the preview>"
}'

curl example — request resubmission of the proof-of-address step:
curl -X PATCH https://verification.didit.me/v3/session/<SESSION_ID>/update-status/ \
-H "x-api-key: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"new_status": "Resubmitted",
"nodes_to_resubmit": [{ "node_id": "feature_poa_1", "feature": "POA" }],
"comment": "Please upload a clearer proof of address",
"send_email": true,
"email_address": "user@example.com"
}'

Response: { "session_id": "<uuid>" } only. Fetch the refreshed session with GET /v3/session/{session_id}/decision/.

Side effects:
\- Fires a status.updated webhook (plus user.status.updated or business.status.updated alias).
\- Writes an entry to the Console review trail with the actor and your comment.
\- "Approved" or "Declined" with send_email=true emails the decision to email_address. Preview Decision Email tells you beforehand whether it will be sent (for example, not to the contact_details address of a session created without contact_details.send_notification_emails=true).
\- "Resubmitted" sends the user back to the steps in nodes_to_resubmit, resets the session expiration window, and (if send_email=true) emails the user a fresh link. What those steps returned before stays readable: the decision endpoint returns it with include=resubmissions (see Retrieve Session).

Failure modes:
\- 400: invalid new_status (only "Approved", "Declined" and "Resubmitted" are accepted), current status not allowed, nothing to resubmit, send_email=true without email_address, or email_preview_token without send_email=true. Field errors look like { "<field>": ["..."] }.
\- 401: the scoped API key has expired.
\- 403: { "detail": "..." } when credentials are missing or invalid, the caller lacks write:sessions (a scoped API key needs decisions write), or the session belongs to another application.
\- 404: { "detail": "Not found." } when no session with this session_id exists.
\- 409: { "detail": "This email preview changed or expired. Preview the message again before confirming." } when email_preview_token no longer matches the email or the session, or is older than 15 minutes. Nothing changed and no email was sent: preview again.
\- 429 - { "detail": "..." } when a resubmit that only targets backend-only features (AML, DATABASE_VALIDATION, IP_ANALYSIS) repeats within 30 seconds of the previous resubmit. Those features re-run automatically with no user interaction, so an immediate repeat cannot change the outcome; honor the Retry-After header instead of retrying in a loop (e.g. from a webhook handler).

Idempotency:
Repeating "Approved" or "Declined" returns 200 and changes nothing. Repeating "Resubmitted" returns 400.

Next step:
After updating, call GET /v3/session/{session_id}/decision/ to fetch the refreshed payload — see /sessions-api/retrieve-session.

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

\</pre>



      
      

粘贴到

## KYC 与 KYB 支持此 endpoint 对 **用户验证（KYC）** 和 **企业验证（KYB）** 会话的处理方式完全相同。Didit 会同时根据这两种会话类型解析 `session_id`；状态转换校验对两者也相同（两种会话适用同一组状态枚举）。响应中只包含 `session_id`。当下游逻辑需要根据会话类型进行分支处理时，请从[检索会话](https://docs.didit.me/zh/sessions-api/retrieve-session.md)中读取 `session_kind`。## 允许的状态转换您可以将会话更改为 `Approved`、`Declined` 或 `Resubmitted`。其他任何 `new_status`（包括 `In Review`）都会返回 `400`。会话当前状态必须是 `Approved`、`Declined`、`In Review`、`Kyc Expired`、`Abandoned` 或 `Resubmitted` 之一，否则 API 返回 `400`。将已为 `Approved` 或 `Declined` 的会话再次设置为相同状态是无操作：API 返回 `200`，不做任何更改，不触发 Webhook，也不发送邮件。将已是 `Resubmitted` 的会话再次设置为 `Resubmitted` 会返回 `400`（`The new status is the same as the current status.`）。如果 `nodes_to_resubmit` 仅包含纯后端功能（`AML`、`DATABASE_VALIDATION`、`IP_ANALYSIS`），重新提交会自动执行，会话无需用户操作即可回到已决策状态。30 秒内重复此类重新提交会返回 `429 Too Many Requests` 和 `Retry-After` 响应头，因为立即重复不会产生不同的结果。收到 `In Review` 状态时，不要在 Webhook 处理程序中自动重新提交，应先审查结果或修改底层数据。## 发送前预览邮件当 `send_email: true` 时，`Approved` 和 `Declined` 会向用户发送决策邮件，`Resubmitted` 会向用户发送包含原因的新链接。您可以在更改任何内容之前查看该邮件：1) 对 `Approved` 或 `Declined` 调用[预览决策邮件](https://docs.didit.me/zh/sessions-api/preview-decision-email.md)，或对 `Resubmitted` 调用[预览重新提交邮件](https://docs.didit.me/zh/sessions-api/preview-resubmission.md)。
2) 检查渲染后的 `subject` 和 `html`、`recipient`，以及 `will_be_sent` / `not_sent_reason`。
3) 使用相同的 `new_status`（若是重新提交，还需使用相同的 `nodes_to_resubmit`）、`send_email: true`，将 `email_address` 设为 `recipient`，将 `email_language` 设为您预览时使用的语言，并将 `email_preview_token` 设为 `preview_token`，然后调用此 endpoint。两种预览都不会更改会话，也不会发送任何内容。更新时将精确发送您预览过的邮件。该凭证 15 分钟后过期。如果预览后收件人、语言、会话状态、发件人或邮件发生变化，更新会在任何更改发生之前返回 `409`；请重新预览，并使用新凭证进行确认。在没有 `send_email: true` 的情况下发送 `email_preview_token` 会返回 `400`。预览步骤是可选的：现有集成可以继续直接调用此 endpoint，无需预览。## 示例> [tab] 批准用户验证（KYC）会话
>
> ```bash theme={null}
> curl -X PATCH https://verification.didit.me/v3/session/4c5c7f3a-.../update-status/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "new_status": "Approved",
>     "comment": "Cleared after manual review by compliance team"
>   }'
> ```> [tab] 拒绝企业验证（KYB）会话
>
> ```bash theme={null}
> curl -X PATCH https://verification.didit.me/v3/session/bs-01HJX1.../update-status/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "new_status": "Declined",
>     "comment": "Sanctioned subsidiary detected in ownership chain"
>   }'
> ```> [tab] 请求重新提交
>
> ```bash theme={null}
> curl -X PATCH https://verification.didit.me/v3/session/.../update-status/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "new_status": "Resubmitted",
>     "nodes_to_resubmit": [
>       { "node_id": "feature_poa_1", "feature": "POA" }
>     ],
>     "comment": "Please upload a clearer proof of address",
>     "send_email": true,
>     "email_address": "user@example.com"
>   }'
> ```> [tab] 批准并发送已预览的邮件
>
> ```bash theme={null}
> curl -X PATCH https://verification.didit.me/v3/session/.../update-status/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "new_status": "Approved",
>     "send_email": true,
>     "email_address": "user@example.com",
>     "email_language": "en",
>     "email_preview_token": "PREVIEW_TOKEN_FROM_THE_PREVIEW"
>   }'
> ```## 权限需要 `write:sessions` 权限。两种会话类型使用同一权限。## 相关- [验证状态](https://docs.didit.me/zh/integration/verification-statuses.md)：状态机参考。
- [检索会话](https://docs.didit.me/zh/sessions-api/retrieve-session.md)：更新后获取决策结果。
- [会话概览](https://docs.didit.me/zh/sessions-api/overview.md)：区分会话类型。
- [预览决策邮件](https://docs.didit.me/zh/sessions-api/preview-decision-email.md)：发送前查看 Approved 或 Declined 邮件。
- [预览重新提交邮件](https://docs.didit.me/zh/sessions-api/preview-resubmission.md)：发送前查看重新提交邮件。


## OpenAPI

````yaml zh/openapi-25.json PATCH /v3/session/{sessionId}/update-status/
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/session/{sessionId}/update-status/:
    patch:
      tags:
        - Sessions
      summary: 批准、拒绝或请求重新提交验证会话
      description: >-
        手动覆盖 KYC 或 KYB 验证会话的最终决策。将 `new_status` 设置为 `Approved` 或 `Declined`
        以记录人工决策，或设置为 `Resubmitted` 以清除特定的验证步骤并让用户通过同一个验证 URL 重新进行验证。该 endpoint
        同时接受用户（KYC）和企业（KYB）会话 ID。


        在会话达到可审核状态后调用此接口：当前状态必须为 `Approved`、`Declined`、`In Review`、`Kyc
        Expired`、`Abandoned` 或 `Resubmitted`。仍处于 `Not Started`、`In Progress` 或
        `Awaiting User` 状态，或以 `Expired` 结束的会话将返回 `400`。您的 API 密钥需要
        `write:sessions` 权限（作用域 API 密钥需要对决策具有写入权限）。符合资格状态的检查在请求体验证之前运行，因此即使
        payload 也无效，不符合条件的会话也会返回 `Wrong Current Status` 错误。


        对于 `Resubmitted`，传递 `nodes_to_resubmit`
        以选择用户必须重做的流程步骤，或省略该参数以自动选择处于可重新提交状态（`Declined`、`In Review`、`Not
        Finished`、`Expired`）的现有功能尝试。从未尝试过的功能不会被自动选择：需在 `nodes_to_resubmit`
        中显式列出它们，否则在没有记录的尝试需要重新提交时，请求将返回 `400`。所选步骤的先前结果将移至重新提交的历史记录中（通过带有
        `include=resubmissions` 的获取决策返回），这些步骤会重新排序以匹配工作流图谱，会话的过期窗口重新启动，原始验证 URL
        恢复可用。位于列表开头的纯后端步骤（`AML`、`DATABASE_VALIDATION`、`IP_ANALYSIS`）无需用户交互即可立即运行；如果所有重新提交的步骤都是纯后端步骤，会话将在同一请求内重新完成最终判定。`KYB_REGISTRY`
        和 `KYB_KEY_PEOPLE` 无法直接重新提交：请改为重新提交相关的子 KYC 会话，父企业会话将自动重新计算。


        每个更改状态的调用都会在更改提交后触发 `status.updated`
        [Webhook](/zh/integration/webhooks)，并在会话的 `reviews` 中追加一条活动记录（包含操作者信息和您的
        `comment`），该记录可在[获取决策](#get-/v3/session/-sessionId-/decision/)和控制台活动时间线中查看。链接到会话
        `vendor_data` 的用户档案汇总数据也会随之更新。拒绝操作会禁用该会话的持续 AML 监控；当工作流启用了监控时，重新通过（从
        `Resubmitted`、`Declined` 或 `Kyc Expired`）会重新启用该监控。批准或拒绝属于 KYB 关键人员检查的子
        KYC 将重新计算父企业会话的状态。设置 `send_email: true`（配合 `email_address`）以通知用户：针对
        `Approved`/`Declined` 发送状态通知，针对 `Resubmitted`
        发送包含验证链接和各步骤原因的重新提交邮件。如需预先检查邮件，可使用[预览决策邮件](/zh/sessions-api/preview-decision-email)（`Approved`、`Declined`）或[预览重新提交邮件](/zh/sessions-api/preview-resubmission)（`Resubmitted`）进行预览，并将其
        `preview_token` 作为 `email_preview_token`
        传递：随后更新将精确发送预览的邮件，或者在预览后邮件或会话发生更改，或预览回执已超过 15 分钟时，在做出任何更改之前返回 `409`。


        对已处于该状态的会话重复设置 `Approved` 或 `Declined` 不会更改任何内容并返回 `200`：不触发
        Webhook、不添加活动记录且不发送邮件。重复设置 `Resubmitted` 将返回 `400`（`The new status is
        the same as the current status.`）。凭据缺失或无效以及权限缺失将返回 `403`；过期的作用域 API
        密钥将返回 `401`。
      operationId: patch_v3_session_update_status
      parameters:
        - in: path
          name: sessionId
          required: true
          description: 要更新的验证会话的 UUID。支持用户（KYC）和企业（KYB）会话 ID，服务会跨两种会话类型解析该 ID。
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - new_status
              properties:
                new_status:
                  type: string
                  description: >-
                    目标状态。`Approved` 和 `Declined`
                    会记录最终的人工审核决策（二者也可相互推翻）。`Resubmitted`
                    会清除所选步骤并将该会话退回给用户。任何其他值都会返回 `400`。
                  enum:
                    - Approved
                    - Declined
                    - Resubmitted
                  example: Approved
                comment:
                  type: string
                  description: >-
                    变更的自由文本原因，存储在该会话的审核轨迹中，并在 [Get
                    Decision](#get-/v3/session/-sessionId-/decision/) 的
                    `reviews` 数组中返回。例如 `Duplicated user`。
                  example: All checks passed manual review
                nodes_to_resubmit:
                  type: array
                  description: >-
                    用户必须重做的工作流步骤。仅在 `new_status` 为 `Resubmitted` 时生效。对于
                    `Approved`/`Declined`，条目仍会进行模式验证（无效的 `feature` 值会返回
                    `400`），但在语义上符合模式的条目会被忽略。如果省略，服务器会自动选择状态为 `Declined`、`In
                    Review`、`Not Finished` 或 `Expired` 的现有
                    OCR、活体检测、人脸比对、地址证明、电话、邮箱、AML、数据库核验和问卷尝试（NFC、IP 分析、年龄估算、人脸搜索和
                    KYB 证件尝试绝不会被自动选择；非人脸比对的人脸尝试会被选为
                    `LIVENESS`）；用户从未尝试过的功能（无记录尝试）不会被选择，因此即使没有任何内容通过，零次尝试的会话也会返回
                    `400`（"No features found that need
                    resubmission"）；在这种情况下请显式传递
                    `nodes_to_resubmit`。无论您发送步骤的顺序如何，步骤均按工作流图谱顺序执行。`KYB_REGISTRY`、`KYB_KEY_PEOPLE`
                    和 `KYB` 别名会被拒绝并返回 `400`，这些父级检查会根据其子 KYC 会话重新计算。
                  items:
                    type: object
                    required:
                      - node_id
                      - feature
                    properties:
                      node_id:
                        type: string
                        description: >-
                          在会话的工作流定义中显示的节点标识符（例如
                          `feature_ocr`、`feature_liveness`）。
                        example: feature_ocr
                      feature:
                        type: string
                        description: >-
                          节点的功能类型。别名 `ID_VERIFICATION`、`POA`、`PHONE` 和 `EMAIL`
                          会在服务端规范化为
                          `OCR`、`PROOF_OF_ADDRESS`、`PHONE_VERIFICATION` 和
                          `EMAIL_VERIFICATION`。`KYB_REGISTRY`、`KYB_KEY_PEOPLE` 和
                          `KYB` 虽然能通过模式验证，但始终会被示例中所示的业务规则 `400` 拒绝。
                        enum:
                          - OCR
                          - OCR_BACK
                          - NFC
                          - AML
                          - FACE
                          - LIVENESS
                          - FACE_MATCH
                          - IP_ANALYSIS
                          - AGE_ESTIMATION
                          - PROOF_OF_ADDRESS
                          - PHONE_VERIFICATION
                          - EMAIL_VERIFICATION
                          - FACE_SEARCH
                          - DATABASE_VALIDATION
                          - QUESTIONNAIRE
                          - DOCUMENT_AI
                          - KYB_DOCUMENTS
                          - ID_VERIFICATION
                          - POA
                          - PHONE
                          - EMAIL
                          - KYB_REGISTRY
                          - KYB_KEY_PEOPLE
                          - KYB
                          - GEOLOCATION
                        example: OCR
                send_email:
                  type: boolean
                  description: >-
                    是否就此变更向用户发送邮件。需要提供 `email_address`。对于
                    `Approved`/`Declined`，用户会收到状态通知；对于
                    `Resubmitted`，邮件将包含验证链接以及针对各步骤的重新提交原因。
                  default: false
                  example: false
                email_address:
                  type: string
                  format: email
                  description: 通知邮件的收件人。**当 `send_email` 为 `true` 时为必填项**，省略将返回 `400`。
                  example: user@example.com
                email_language:
                  type: string
                  description: 通知邮件的语言。在 schema 层面接受任何字符串；不支持的代码将以静默方式回退为英语（`en`）。
                  default: en
                  example: en
                email_preview_token:
                  type: string
                  writeOnly: true
                  minLength: 1
                  maxLength: 512
                  description: >-
                    来自[预览决策邮件](/zh/sessions-api/preview-decision-email)（适用于
                    `Approved` 和
                    `Declined`）或[预览重新提交邮件](/zh/sessions-api/preview-resubmission)（适用于
                    `Resubmitted`）的可选凭证：即其 `preview_token`。仅在 `send_email: true`
                    时有效；若未提供，请求将返回
                    `400`。收件人、语言、会话状态、发件人和邮件（以及在重新提交时所选的步骤）仍必须与预览匹配，且凭证在 15
                    分钟后过期。否则在会话发生变更或发送邮件之前，请求将返回 `409`。现有集成可以省略此字段。
            examples:
              Approve Session:
                summary: 人工审核后批准会话
                value:
                  new_status: Approved
                  comment: All checks passed manual review
              Decline Session:
                summary: 拒绝会话
                value:
                  new_status: Declined
                  comment: Suspected fraud
              Resubmit Specific Steps:
                summary: 请求通过电子邮件重新提交所选步骤
                value:
                  new_status: Resubmitted
                  nodes_to_resubmit:
                    - node_id: feature_ocr
                      feature: OCR
                    - node_id: feature_liveness
                      feature: LIVENESS
                  send_email: true
                  email_address: user@example.com
                  email_language: en
              Resubmit Auto-select:
                summary: 请求重新提交（自动选择未通过的步骤）
                value:
                  new_status: Resubmitted
              Approve With Previewed Email:
                summary: 批准并发送“预览决策邮件”返回的邮件
                value:
                  new_status: Approved
                  send_email: true
                  email_address: person@example.com
                  email_language: en
                  email_preview_token: >-
                    eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000
      responses:
        '200':
          description: >-
            状态已更新。响应仅包含 `session_id`；请通过 [Get
            Decision](#get-/v3/session/-sessionId-/decision/) 获取更新后的会话。变更提交后会触发
            `status.updated` Webhook。重复传入 `Approved` 或 `Declined`
            会返回相同的响应体且不做任何更改。
          content:
            application/json:
              schema:
                type: object
                properties:
                  session_id:
                    type: string
                    format: uuid
                    description: 已更新会话的 UUID。
              examples:
                Updated:
                  summary: 针对已通过、已拒绝和已重新提交均会返回
                  value:
                    session_id: 3472fb7c-8f7c-4d1a-9cf4-cf3d74ce1a60
        '400':
          description: >-
            验证错误。字段错误以 `{"<field>": ["<message>"]}`
            形式返回（某些业务规则拒绝使用字符串值代替：`{"nodes_to_resubmit": "<message>"}`），跨状态错误以
            `{"detail": "<message>"}` 形式返回，相同状态错误以纯 JSON 数组形式返回。
          content:
            application/json:
              examples:
                Wrong Current Status:
                  summary: 会话不处于可更新状态
                  value:
                    detail: >-
                      Only sessions with status Approved, Declined, In Review,
                      Kyc Expired, Abandoned, Resubmitted can be updated.
                      Current status: In Progress
                Invalid Status Value:
                  summary: new_status 是有效的会话状态，但不是 Approved/Declined/Resubmitted 之一
                  value:
                    new_status:
                      - >-
                        You can only update the status to 'Approved',
                        'Declined', or 'Resubmitted'.
                Missing new_status:
                  summary: 遗漏了必填字段
                  value:
                    new_status:
                      - This field is required.
                Same Status:
                  summary: 针对已处于“已重新提交”状态的会话请求了重新提交
                  value:
                    - The new status is the same as the current status.
                Email Address Required:
                  summary: send_email 为 true 但未提供 email_address
                  value:
                    email_address:
                      - Email address is required when send_email is true.
                Non-resubmittable Feature:
                  summary: 重新提交的目标是 KYB 父级检查
                  value:
                    nodes_to_resubmit: >-
                      The following features cannot be resubmitted directly:
                      KYB_REGISTRY. Resubmit the relevant child KYC sessions
                      instead; the parent will recompute automatically.
                Nothing To Resubmit:
                  summary: 自动选择未找到未批准的功能
                  value:
                    nodes_to_resubmit: >-
                      No features found that need resubmission. All features are
                      already approved.
                Invalid Feature Choice:
                  summary: nodes_to_resubmit 中存在未知功能
                  value:
                    nodes_to_resubmit:
                      - feature:
                          - >-
                            "BOGUS" is not a valid choice. Valid choices are:
                            OCR, OCR_BACK, NFC, AML, FACE, LIVENESS, FACE_MATCH,
                            IP_ANALYSIS, AGE_ESTIMATION, PROOF_OF_ADDRESS,
                            PHONE_VERIFICATION, EMAIL_VERIFICATION, FACE_SEARCH,
                            DATABASE_VALIDATION, QUESTIONNAIRE, KYB_REGISTRY,
                            KYB_DOCUMENTS, KYB_KEY_PEOPLE, ID_VERIFICATION, POA,
                            PHONE, EMAIL, KYB
                Invalid Status Value (not a status at all):
                  summary: new_status 不是有效的 StatusChoices 值
                  value:
                    new_status:
                      - '"Bogus" is not a valid choice.'
                Preview Receipt Without Email:
                  summary: '发送了 email_preview_token 但未设置 send_email: true'
                  value:
                    email_preview_token:
                      - A preview receipt is only valid when the email is sent.
        '401':
          description: 作用域 API 密钥已过期。
          content:
            application/json:
              examples:
                Expired API Key:
                  summary: 已过有效期的作用域 API 密钥
                  value:
                    detail: This API key has expired.
        '403':
          description: 缺少凭据或权限不足，或者 `session_id` 属于另一个应用。
          content:
            application/json:
              examples:
                Invalid Credentials:
                  summary: x-api-key 缺失或无效
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Missing Privilege:
                  summary: API 密钥缺少 write:sessions
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: 不存在具有此 `session_id` 的 KYC 或 KYB 会话（已删除的会话同样返回 `404`）。
          content:
            application/json:
              examples:
                Not Found:
                  summary: 未知的 session_id
                  value:
                    detail: Not found.
        '409':
          description: 电子邮件预览已更改或已过期。请在确认前重新生成预览；不会发生会话更改或电子邮件投递。
          content:
            application/json:
              examples:
                Preview Changed:
                  summary: 收据不再匹配，或已超过 15 分钟
                  value:
                    detail: >-
                      This email preview changed or expired. Preview the message
                      again before confirming.
        '429':
          description: >-
            仅针对纯后端功能（AML、DATABASE_VALIDATION、IP_ANALYSIS）的重新提交在 30
            秒冷却窗口内重复发起；立即重复发起无法改变结果。请降低重试频率，并在 `Retry-After` 指示的间隔后重试。
          content:
            application/json:
              examples:
                Backend-only resubmit throttled:
                  value:
                    detail: >-
                      This session was already resubmitted for backend-only
                      features within the last 30 seconds; repeating it cannot
                      change the outcome. Wait before resubmitting again.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X PATCH \
              https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-status/ \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "new_status": "Approved",
                "comment": "All checks passed manual review"
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.update_status(
                "11111111-2222-3333-4444-555555555555",
                new_status="Approved",
                comment="All checks passed manual review",
            )
            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.updateStatus("11111111-2222-3333-4444-555555555555",
            {
              new_status: "Approved",
              comment: "All checks passed manual review",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateStatusParams{\n\tNewStatus: \"Approved\",\n\tComment:   didit.String(\"All checks passed manual review\"),\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.SessionsUpdateStatusParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().updateStatus("11111111-2222-3333-4444-555555555555",
            SessionsUpdateStatusParams.builder()
                    .newStatus(SessionsUpdateStatusParams.NewStatus.of("Approved"))
                    .comment("All checks passed manual review")
                    .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->updateStatus('11111111-2222-3333-4444-555555555555',
            [
                'new_status' => 'Approved',
                'comment' => 'All checks passed manual review',
            ]);

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.sessions.update_status(
              "11111111-2222-3333-4444-555555555555",
              new_status: "Approved",
              comment: "All checks passed manual review"
            )
            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.UpdateStatusAsync("11111111-2222-3333-4444-555555555555",
            new SessionsUpdateStatusParams

            {
                NewStatus = "Approved",
                Comment = "All checks passed manual review",
            });

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