> ## 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のサポートこのエンドポイントは、**本人確認（KYC）**セッションでも**法人確認 (KYB)**セッションでもまったく同じように動作します。Diditは`session_id`を両方のセッション種別について解決します。ステータス遷移の検証も両者で共通です（同じステータスの列挙値が両方に適用されます）。レスポンスに含まれるのは`session_id`のみです。
後続の処理で種別ごとに分岐する必要がある場合は、[Retrieve Session](https://docs.didit.me/ja/sessions-api/retrieve-session.md)から`session_kind`を取得してください。## 許可される遷移セッションのステータスは`Approved`、`Declined`、`Resubmitted`のいずれかに変更できます。
`In Review`を含め、それ以外の`new_status`を指定すると`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秒以内に繰り返すと、`Retry-After`ヘッダー付きで`429 Too Many Requests`が返されます。直後に繰り返しても異なる結果にはならないためです。
`In Review`ステータスを受信するたびにWebhookハンドラーから自動で再提出しないでください。まず検出内容をレビューするか、基となるデータを変更してください。## 事前にメールをプレビューする`send_email: true`を指定すると、`Approved`と`Declined`では本人に判定結果のメールが送信され、`Resubmitted`では理由を添えた新しいリンクが送信されます。
何かを変更する前に、そのメールを確認できます。1) `Approved`または`Declined`の場合は[Preview Decision Email](https://docs.didit.me/ja/sessions-api/preview-decision-email.md)を、`Resubmitted`の場合は[Preview Resubmission Email](https://docs.didit.me/ja/sessions-api/preview-resubmission.md)を呼び出します。
2) レンダリングされた`subject`と`html`、`recipient`、および`will_be_sent` / `not_sent_reason`を確認します。
3) 同じ`new_status`（再提出の場合は同じ`nodes_to_resubmit`も）、`send_email: true`、`recipient`を設定した`email_address`、プレビューした`email_language`、`preview_token`を設定した`email_preview_token`を指定して、このエンドポイントを呼び出します。どちらのプレビューもセッションを変更せず、何も送信しません。
その後の更新では、プレビューしたメールがそのまま送信されます。
この確認情報は15分後に期限切れになります。
プレビュー後に受信者、言語、セッションステータス、送信者、またはメールが変更された場合、更新は何かが変更される前に`409`を返します。もう一度プレビューし、新しい確認情報を使用して確定してください。
`send_email: true`を指定せずに`email_preview_token`を送信すると、`400`が返されます。
プレビューのステップは任意です。既存の連携では、プレビューなしでこのエンドポイントを引き続き呼び出せます。## 例> [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/ja/integration/verification-statuses.md): ステータスマシンのリファレンス。
- [セッションの取得](https://docs.didit.me/ja/sessions-api/retrieve-session.md): 更新後に判定を取得します。
- [セッションの概要](https://docs.didit.me/ja/sessions-api/overview.md): 種別の判別。
- [Preview Decision Email](https://docs.didit.me/ja/sessions-api/preview-decision-email.md): 承認または却下のメールを送信前に確認します。
- [Preview Resubmission Email](https://docs.didit.me/ja/sessions-api/preview-resubmission.md): 再提出のメールを送信前に確認します。


## OpenAPI

````yaml ja/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からそれらのステップをやり直せます。このエンドポイントは、ユーザー（KYC）と企業（KYB）のどちらのセッションIDも受け付けます。


        セッションがレビュー可能な状態になってから呼び出してください。現在のステータスは`Approved`、`Declined`、`In
        Review`、`Kyc Expired`、`Abandoned`、`Resubmitted`のいずれかである必要があります。まだ`Not
        Started`、`In Progress`、`Awaiting
        User`の状態にあるセッション、または`Expired`で終了したセッションでは`400`が返されます。APIキーには`write:sessions`権限が必要です（スコープ付きAPIキーの場合は、判定への書き込みアクセスが必要です）。対象状態のチェックはボディの検証より前に実行されます。そのため対象外のセッションでは、ペイロードも無効な場合であっても`Wrong
        Current Status`エラーが返されます。


        `Resubmitted`の場合、ユーザーがやり直す必要のあるワークフローステップは`nodes_to_resubmit`で選択します。省略すると、再提出可能な状態（`Declined`、`In
        Review`、`Not
        Finished`、`Expired`）にある既存の機能の試行が自動的に選択されます。一度も試行されていない機能は自動選択されないため、`nodes_to_resubmit`で明示的に指定してください。指定しない場合、再提出が必要な記録済みの試行がなければ、リクエストは`400`を返します。選択したステップの以前の結果は再提出の履歴に移動します（`include=resubmissions`を指定したGet
        Decisionで返されます）。あわせて、ステップはワークフローのグラフに合わせて並べ替えられ、セッションの有効期限の期間が再開され、元の認証URLが再び使用可能になります。リストの先頭にあるバックエンド専用のステップ（`AML`、`DATABASE_VALIDATION`、`IP_ANALYSIS`）は、ユーザーの操作なしに即座に実行されます。再提出したステップがすべてバックエンド専用の場合、セッションは同じリクエスト内で再確定されます。`KYB_REGISTRY`と`KYB_KEY_PEOPLE`は直接再提出できません。代わりに関連する子KYCセッションを再提出してください。親の企業セッションは自動的に再計算されます。


        ステータスを変更する呼び出しでは、変更がコミットされるたびに`status.updated`の[Webhook](/ja/integration/webhooks)が送信されます。また、セッションの`reviews`にアクティビティエントリ（実行者の情報と`comment`を含む）が追加され、[Get
        Decision](#get-/v3/session/-sessionId-/decision/)とコンソールのアクティビティタイムラインで確認できます。セッションの`vendor_data`に紐づくユーザープロファイルの集計も更新されます。却下すると、セッションの継続的なAMLモニタリングが無効になります。ワークフローでモニタリングが有効になっている場合、（`Resubmitted`、`Declined`、`Kyc
        Expired`からの）再承認で再び有効になります。KYBの主要人物チェックに属する子KYCを承認または却下すると、親の企業セッションのステータスが再計算されます。ユーザーに通知するには、`send_email:
        true`を（`email_address`とあわせて）設定します。`Approved`/`Declined`ではステータス通知が送信され、`Resubmitted`では認証リンクとステップごとの理由を含む再提出メールが送信されます。事前にメールを確認する場合は、[Preview
        Decision
        Email](/ja/sessions-api/preview-decision-email)（`Approved`、`Declined`）または[Preview
        Resubmission
        Email](/ja/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、ライブネス検知、顔照合、POA、電話番号検証、メールアドレス認証、AML、データベース検証、アンケートの試行を自動で選択します（NFC、IP分析、年齢推定、顔検索、KYB書類の試行は自動選択されません。顔照合以外の顔の試行は`LIVENESS`として選択されます）。ユーザーが一度も試行していない機能（試行の記録がないもの）は選択されません。そのため、試行が0件のセッションでは、何も承認されていなくても`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: >-
                    通知メールの言語。スキーマ上は任意の文字列を受け付けますが、対応していないコードは通知なく英語(`en`)にフォールバックします。
                  default: en
                  example: en
                email_preview_token:
                  type: string
                  writeOnly: true
                  minLength: 1
                  maxLength: 512
                  description: >-
                    [判定メールのプレビュー](/ja/sessions-api/preview-decision-email)（`Approved`および`Declined`の場合）または[再提出メールのプレビュー](/ja/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: Preview Decision Emailが返したメールを承認して送信する
                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: すでにResubmittedのセッションで再提出がリクエストされた
                  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のDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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