> ## 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.

# 主要人物のKYCセッション再生成API

> Didit APIで、以前のKYCセッションが開始前に削除または期限切れになったKYBの主要人物向けに新しいKYCセッションを作成し、新しいリンクをメールで送信します。



主要人物のKYCセッション再生成API用プロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Give a Key People party of a Didit Business Verification (KYB) session a new individual KYC session through the API.

Endpoint:
POST https://verification.didit.me/v3/session/{session_id}/kyb/parties/{party_uuid}/regenerate/
(no request body)

Authentication:
Send my Didit API key in the x-api-key header. A scoped key needs decisions: write.

Goal:
\- Re-verify a person (UBO, director, other key person) whose individual KYC session was deleted, or expired before the person started it. Neither link lets the person complete verification. An expired child can cause the business session to become Declined; regenerate the party to issue a fresh link.

Behavior:
\- {session_id} is the parent business session; {party_uuid} is key_people_checks[].submitted.parties[].uuid from its decision and must belong to that session.
\- Works when the party's KYC session was deleted (kyc_session_deleted: true) or expired before the person started it. A session still in progress or one that ended in another status (Approved, Declined, In Review, Abandoned...) returns 409 unless it was deleted. A party that never had one or a company party always returns 409.
\- Deleted sessions qualify even if the person had already started or finished verification. Imported sessions do not qualify through expiry; they must have been deleted.
\- Didit creates a new hosted KYC session for the person, with the workflow the party was verified with (its latest published version) or, when that is no longer known, the workflow my Key People settings assign to the person's role. The new link lasts that KYC workflow's session expiration time, not the business session's. Its vendor_data is kyb-party-PARTY_UUID.
\- Didit emails the verification link to the party's email, when there is one.
\- is_skipped is cleared, so the Key People check waits on the new session.
\- The Key People check and the business session status are recomputed at once.
\- A data.updated webhook is sent for the business session with trigger "console_key_people_regenerate".
\- To exempt the party instead of re-verifying them, use PATCH /v3/session/{session_id}/kyb/parties/{party_uuid}/ with {"is_skipped": true}.

Example call:
curl -X POST "https://verification.didit.me/v3/session/33333333-4444-5555-6666-777777777777/kyb/parties/0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41/regenerate/" \
-H "x-api-key: YOUR_API_KEY"

What to read from the response (the updated party):
\- kyc_session_id: the new KYC session.
\- kyc_session_url: its hosted link, to share yourself if the party has no email. A scoped key without sessions: write receives it as null.
\- kyc_session_status (Not Started), kyc_session_deleted (false), is_skipped (false).

Failure modes:
\- 401: the API key has expired.
\- 403: missing key (a wrong, revoked or expired key gets 401), a key of another application, a scoped key without decisions: write, or a request from outside the key's IP allowlist.
\- 404: the session does not exist, was deleted, or is outside a scoped key's limits; no party has this UUID; or the party belongs to another session.
\- 409 with code kyb_party_kyc_session_not_deleted: no eligible KYC session to replace. A person qualifies only when their session was deleted or a non-imported session expired before the person started it. All other sessions, a party that never had one, and company parties are rejected.

Side effects: creates a KYC session, may send an email to the party, recomputes the business session status and sends a data.updated webhook.

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

\</pre>



      
      

貼り付け先

以前のリンクが使えなくなった場合、つまりセッションが削除された場合、または本人が開始する前に期限切れになった場合に使用します。削除されたセッションは、本人がすでに認証を開始または完了していても対象になります。インポートされたセッションは期限切れでは対象にならず、削除されている必要があります。削除されておらず、本人がすでに開始していたセッションは、期限切れでは対象になりません。新しいセッションは同じ当事者に紐付けられるため、その結果は元のセッションと同様に主要人物のチェックに反映されます。また、そのリンクの有効期間は、企業セッションではなく、実行するKYCワークフローのセッション有効期限(1時間から4週間)に従います。当事者とその子セッションは[企業セッションの判定](https://docs.didit.me/ja/business-verification/response-schema.md#key_people_checks)で確認できます。その人物を認証する必要がまったくない場合は、代わりに[当事者をスキップ](https://docs.didit.me/ja/sessions-api/update-data.md#主要人物の当事者をスキップ)してください。当事者とその認証の仕組みについては、[主要人物](https://docs.didit.me/ja/business-verification/key-people.md)を参照してください。


## OpenAPI

````yaml ja/openapi-25.json POST /v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/
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}/kyb/parties/{partyUuid}/regenerate/:
    post:
      tags:
        - Sessions
      summary: 主要人物の当事者のKYCセッションを再生成する
      description: >-
        法人確認
        (KYB)セッションの主要人物パーティーに、新しい個人KYCセッションを付与します。対象は、以前のKYCセッションが削除された場合、または本人が開始する前に期限切れになった場合です。これにより主要人物チェックを再び完了できるようになります。リクエストボディは送信しません。この操作が機能するのは、パーティーのKYCセッションが削除された場合(`kyc_session_deleted:
        true`)、または本人が開始する前に期限切れになった場合(`Expired`、未開始)です。進行中のセッション、またはその他のステータス(`Approved`、`Declined`、`In
        Review`、`Abandoned`など)で終了したセッションは、削除されていない限り`409`を返します。KYCセッションを一度も持たなかったパーティーと企業パーティーは、常に`409`を返します。Diditは新しいホスト型KYCセッションを作成します。使用するのは、パーティーの認証に使われたワークフロー(その最新の公開バージョン)です。それが不明になっている場合は、主要人物設定でパーティーの役割に割り当てられたワークフローを使用します。そのため、リンクの有効期間はそのKYCワークフローのセッション有効期限に従います。メールアドレスが登録されている場合はパーティーにリンクをメールで送信し、`is_skipped`をクリアして、主要人物チェックと企業セッションのステータスを再計算します。その後、企業セッションについて、トリガー`console_key_people_regenerate`付きの`data.updated`
        [Webhook](https://docs.didit.me/ja/integration/webhooks)を送信します。代わりにパーティーを免除するには、`PATCH
        /v3/session/{sessionId}/kyb/parties/{partyUuid}/`を使用してください。スコープ付きAPIキーには`decisions:
        write`が必要です。`sessions:
        write`がない場合、`kyc_session_url`は`null`として返されます。削除されたセッションは、本人がすでに認証を開始または完了していた場合でも対象になります。インポートされたセッションは期限切れでは対象にならず、削除されている必要があります。
      operationId: post_v3_session_kyb_party_regenerate
      parameters:
        - name: sessionId
          in: path
          required: true
          description: 親となる法人確認 (KYB) セッションのUUIDです。
          schema:
            type: string
            format: uuid
            example: 33333333-4444-5555-6666-777777777777
        - name: partyUuid
          in: path
          required: true
          description: >-
            主要人物の当事者のUUID
            (法人セッションの判定内の`key_people_checks[].submitted.parties[].uuid`)
            です。`sessionId`で参照されるセッションに属している必要があります。
          schema:
            type: string
            format: uuid
            example: 0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41
      responses:
        '200':
          description: >-
            新しいKYCセッションが作成されました。新しい子セッションを含む更新後のパーティーを返します。この子セッションは、そのKYCワークフローに設定されたセッション有効期限が経過すると期限切れになります。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KYBKeyPeopleParty'
              example:
                uuid: 0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41
                entity_type: person
                source: USER
                name: Jane Smith
                first_name: Jane
                last_name: Smith
                company_name: null
                registration_number: null
                email: user@example.com
                nationality: GB
                phone_number: null
                date_of_birth: '1980-05-04'
                position: Director
                custom_fields: {}
                is_active: true
                is_skipped: false
                requires_verification: true
                roles:
                  - role: director
                    ownership_percent: null
                    voting_percent: null
                kyc_session_id: 55555555-6666-7777-8888-999999999999
                kyc_session_status: Not Started
                kyc_session_url: https://verify.didit.me/session/abc123def456
                kyc_session_deleted: false
                kyb_sub_session_id: null
                kyb_sub_session_status: null
                kyb_sub_session_url: null
                kyb_sub_session_deleted: false
                verification_workflow_type: kyc
                verification_workflow_id: 12121212-3434-5656-7878-909090909090
                verification_workflow_label: Key People KYC
                verification_workflow_features:
                  - feature: ID_VERIFICATION
                    status: Not Finished
                  - feature: LIVENESS
                    status: Not Finished
                  - feature: AML
                    status: Not Finished
                didit_internal_id: null
        '401':
          description: >-
            スコープ付きAPIキーの有効期限が切れています。`401`が返されるのはこの場合のみです。キーが指定されていない場合、無効な場合、または取り消されている場合は`403`が返されます。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 人が読めるエラーメッセージ。
              examples:
                Expired key:
                  summary: キーの有効期限が過ぎています
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            認証または認可に失敗しました。キーがない場合、別のアプリケーションのキーの場合、このエンドポイントに必要な権限を持たないスコープ付きキーの場合、キーのIP許可リスト外からのリクエストの場合は`403`を返し、誤った、失効した、または期限切れのキーの場合は`401`を返します。`detail`で区別してください。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 人が読めるエラーメッセージ。
              examples:
                Missing or invalid credentials:
                  summary: x-api-keyヘッダーがないか、キーの検証に失敗しました
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Other application:
                  summary: セッションとは別のアプリケーションに属する有効なキー
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without decisions write:
                  summary: 'スコープ付きキーにdecisions: write権限がない'
                  value:
                    detail: This API key has no write access to decisions.
                IP not allowed:
                  summary: キーのIP許可リスト外からのリクエスト
                  value:
                    detail: This API key can't be used from this IP address.
        '404':
          description: >-
            セッションが存在しない、削除されている、またはスコープ付きキーの制限外である。このUUIDの当事者がアプリケーションに存在しない。または、当事者が別のセッションに属している。それぞれの場合に個別の`detail`が返されます。セッションの照会は認証情報の確認より前に行われるため、有効なキーがなくても、不明な`sessionId`には`404`が返されます。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 人が読めるエラーメッセージ。
              examples:
                Unknown session:
                  summary: このIDのセッションが存在しないか、削除されています
                  value:
                    detail: Not found.
                Outside key limits:
                  summary: セッションがスコープ付きキーのワークフローまたは承認済みのみの制限外です
                  value:
                    detail: Session not found.
                Unknown party:
                  summary: このUUIDの当事者はアプリケーション内に存在しません
                  value:
                    detail: No BusinessParty matches the given query.
                Party of another session:
                  summary: partyUuidは存在するが、別のセッションに属している
                  value:
                    detail: Party does not belong to the given session.
        '409':
          description: >-
            当事者には置き換え可能なKYCセッションがありません。削除された場合を除き、進行中のセッションや、別のステータス（`Approved`、`Declined`、`In
            Review`、`Abandoned`など）で終了したセッションは再生成できません。セッションを一度も持たなかった当事者や企業の当事者も`409`を返します。対象となるセッションは、本人が開始する前に削除されたか期限切れになったものです。削除されたセッションは、本人がすでに認証を開始または完了していても対象となります。インポートされたセッションは期限切れでは対象とならず、削除されている必要があります。`code`で分岐してください。
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                  - code
                properties:
                  detail:
                    type: string
                    description: 人が読めるエラーメッセージ。
                  code:
                    type: string
                    enum:
                      - kyb_party_kyc_session_not_deleted
                    description: 安定した機械可読エラーコード。
              example:
                detail: >-
                  This party's KYC session is still live (it has neither been
                  deleted nor expired without starting), so it cannot be
                  regenerated.
                code: kyb_party_kyc_session_not_deleted
        '429':
          description: >-
            レート制限を超過しました。書き込み（POST、PATCH、DELETE）リクエストはAPIキーごとに1分あたり300件までです。`Retry-After`秒待ってから再試行してください。`X-RateLimit-*`ヘッダーで利用枠を確認できます。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 人が読めるエラーメッセージ。
              examples:
                Rate limited:
                  summary: 現在の1分間の上限を使い切りました
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      requests per minute.
          headers:
            Retry-After:
              description: 再試行までに待機する秒数。
              schema:
                type: integer
                minimum: 1
                example: 30
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/session/33333333-4444-5555-6666-777777777777/kyb/parties/0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41/regenerate/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.regenerate_kyb_party(
                "33333333-4444-5555-6666-777777777777",
                "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41",
            )
            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.regenerateKybParty(
              "33333333-4444-5555-6666-777777777777",
              "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41",
            );
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.RegenerateKYBParty(ctx, \"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().regenerateKybParty("33333333-4444-5555-6666-777777777777",
            "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41");

            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->regenerateKybParty('33333333-4444-5555-6666-777777777777',
            '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41');

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

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

            result = didit.sessions.regenerate_kyb_party(
              "33333333-4444-5555-6666-777777777777",
              "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41"
            )
            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.RegenerateKybPartyAsync("33333333-4444-5555-6666-777777777777",
            "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    KYBKeyPeopleParty:
      type: object
      description: >-
        法人確認
        (KYB)セッションの主要人物の当事者と、その子検証。同じ当事者は、企業セッションの判定の`key_people_checks[].submitted.parties[]`にも含まれます。
      required:
        - uuid
        - entity_type
        - source
        - name
        - is_active
        - is_skipped
        - requires_verification
        - roles
        - kyc_session_deleted
        - kyb_sub_session_deleted
      properties:
        uuid:
          type: string
          format: uuid
          description: 関係者の識別子。
        entity_type:
          type: string
          enum:
            - person
            - company
          description: 当事者が個人か企業か。
        source:
          type: string
          enum:
            - REGISTRY
            - USER
          description: '`REGISTRY`：法人登記から取得したものです。`USER`：主要人物画面で入力したものです。'
        name:
          type: string
          description: 当事者の表示名です。
        first_name:
          type: string
          nullable: true
          description: 名（個人）。
        last_name:
          type: string
          nullable: true
          description: 姓(個人)。
        company_name:
          type: string
          nullable: true
          description: 会社名（企業の当事者）。
        registration_number:
          type: string
          nullable: true
          description: 会社の登記番号（企業の当事者）。
        email:
          type: string
          format: email
          nullable: true
          description: 認証リンクの送信先メールアドレス。
        nationality:
          type: string
          nullable: true
          description: 個人の場合は国籍、企業の場合は設立国。
        phone_number:
          type: string
          nullable: true
          description: 当事者について収集された電話番号。
        date_of_birth:
          type: string
          format: date
          nullable: true
          description: 生年月日（個人）。
        position:
          type: string
          nullable: true
          description: 自由記述の役職（個人）。
        custom_fields:
          type: object
          additionalProperties: true
          description: 当事者について収集された、ワークフローで定義されたカスタムフィールド。フィールドキーをキーとします。
        is_active:
          type: boolean
          description: 当事者が有効かどうか。
        is_skipped:
          type: boolean
          description: 当事者が検証を免除されているかどうか。再生成するとクリアされます。
        requires_verification:
          type: boolean
          description: 役割と所有構造のルールにより、この当事者の検証が必要かどうか。
        roles:
          type: array
          description: 当事者が企業内で持つ役割。
          items:
            type: object
            required:
              - role
              - ownership_percent
              - voting_percent
            properties:
              role:
                type: string
                enum:
                  - director
                  - non_executive_director
                  - secretary
                  - chairman
                  - ubo
                  - shareholder
                  - representative
                  - founder
                  - legal_advisor
                  - authorized_signatory
                  - trustee
                  - beneficiary
                  - settlor
                  - protector
                  - company_officer
                  - investor
                  - other
                description: 役割コード。
              ownership_percent:
                type: number
                nullable: true
                description: この役割の所有割合（判明している場合）。
              voting_percent:
                type: number
                nullable: true
                description: この役割の議決権比率（判明している場合）。
        kyc_session_id:
          type: string
          format: uuid
          nullable: true
          description: 個人向けの子KYCセッション（個人）。
        kyc_session_status:
          type: string
          nullable: true
          enum:
            - Not Started
            - In Progress
            - Approved
            - Declined
            - In Review
            - Expired
            - Abandoned
            - Kyc Expired
            - Resubmitted
            - Awaiting User
            - null
          description: 子KYCセッションのステータスです。削除されたセッションは、削除時点のステータスを保持します。
        kyc_session_url:
          type: string
          format: uri
          nullable: true
          description: >-
            子KYCセッションのホスト型リンクです。セッションが存在しない場合や削除された場合、および`sessions:
            write`を持たないスコープ付きAPIキーの場合は`null`です。
        kyc_session_deleted:
          type: boolean
          description: 子KYCセッションが削除されたため、確定することはありません。
        kyb_sub_session_id:
          type: string
          format: uuid
          nullable: true
          description: 子KYBセッション（法人の当事者）。
        kyb_sub_session_status:
          type: string
          nullable: true
          enum:
            - Not Started
            - In Progress
            - Approved
            - Declined
            - In Review
            - Expired
            - Abandoned
            - Kyc Expired
            - Resubmitted
            - Awaiting User
            - null
          description: 子KYBセッションのステータス。
        kyb_sub_session_url:
          type: string
          format: uri
          nullable: true
          description: 子KYBセッションのホスト型リンクです。`null`になる条件は`kyc_session_url`と同じです。
        kyb_sub_session_deleted:
          type: boolean
          description: '`kyc_session_deleted`の法人当事者版。'
        verification_workflow_type:
          type: string
          nullable: true
          enum:
            - kyc
            - kyb
            - adaptive_age_verification
            - biometric_authentication
            - address_verification
            - questionnaire_verification
            - email_verification
            - phone_verification
            - null
          description: 子セッションが実行するワークフローの種類。
        verification_workflow_id:
          type: string
          format: uuid
          nullable: true
          description: 子セッションが実行するワークフロー。
        verification_workflow_label:
          type: string
          nullable: true
          description: そのワークフローのラベル。
        verification_workflow_features:
          type: array
          nullable: true
          description: 子セッションのワークフローに含まれる機能と、その現在のステータスです。
          items:
            type: object
            required:
              - feature
              - status
            properties:
              feature:
                type: string
                description: '機能コード。例: `ID_VERIFICATION`、`LIVENESS`。'
              status:
                type: string
                description: 機能のステータス。実行されるまでは`Not Finished`です。
        didit_internal_id:
          type: string
          format: uuid
          nullable: true
          description: 認証された人物のDidit識別子です（判明した時点で設定されます）。
  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.