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

# Regenerate Key People KYC Session

> Create a new individual KYC session for a KYB Key People party whose previous session was deleted, and email the person a fresh link.



Regenerate Key People KYC Session API Prompt
        Copy prompt to clipboard



      
      

\<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. A deleted session can never finish, so the Key People check would otherwise wait on it indefinitely.

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 only when the party's KYC session was deleted (kyc_session_deleted: true). For a party whose session still exists, in any status, or for a company party, it returns 409.
\- Didit creates a new hosted KYC session for the person, with the workflow the deleted one ran (its latest published version) or, when that is no longer known, the workflow my Key People settings assign to the person's role. 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 or invalid key, 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: the party's KYC session was not deleted, so there is nothing to replace.

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>



      
      

Paste into

The new session is linked to the same party, so its result flows into the Key People check like the original would have. Read the party and its child sessions in the [business session decision](/business-verification/response-schema.md#key_people_checks). If the person should not be verified at all, [skip the party](/sessions-api/update-data.md#skip-a-key-people-party) instead. See [Key People](/business-verification/key-people.md) for how parties and their verifications work.


## OpenAPI

````yaml POST /v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/:
    post:
      tags:
        - Sessions
      summary: Regenerate a Key People party's KYC session
      description: >-
        Give a Key People party of a Business Verification (KYB) session a new
        individual KYC session after its previous one was deleted, so the Key
        People check can finish again; send no request body. It works only when
        the party's KYC session was deleted (`kyc_session_deleted: true`): a
        party whose KYC session still exists (in any status), a party that never
        had one, or a company party returns `409`. Didit creates a new hosted
        KYC session with the workflow the deleted one ran (its latest published
        version) or, when that is no longer known, the workflow your Key People
        settings assign to the party's role, emails the link to the party when
        an email is on file, clears `is_skipped`, and recomputes the Key People
        check and the business session status. It then sends a `data.updated`
        [webhook](https://docs.didit.me/integration/webhooks) for the business
        session with trigger `console_key_people_regenerate`; to exempt the
        party instead, use `PATCH
        /v3/session/{sessionId}/kyb/parties/{partyUuid}/`. A scoped API key
        needs `decisions: write`, and without `sessions: write` it receives
        `kyc_session_url` as `null`.
      operationId: post_v3_session_kyb_party_regenerate
      parameters:
        - name: sessionId
          in: path
          required: true
          description: UUID of the parent Business Verification (KYB) session.
          schema:
            type: string
            format: uuid
            example: 33333333-4444-5555-6666-777777777777
        - name: partyUuid
          in: path
          required: true
          description: >-
            UUID of the Key People party
            (`key_people_checks[].submitted.parties[].uuid` on the business
            session decision). Must belong to the session referenced by
            `sessionId`.
          schema:
            type: string
            format: uuid
            example: 0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41
      responses:
        '200':
          description: >-
            New KYC session created. Returns the updated party with its new
            child session.
          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: >-
            The scoped API key has expired. This is the only case that returns
            `401`: a missing, invalid or revoked key returns `403`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
              examples:
                Expired key:
                  summary: The key's expiry date has passed
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            Authentication or authorization failure. Missing, invalid and
            revoked keys return `403` (not `401`); so do a key of another
            application, a scoped key without the permission this endpoint
            needs, and a request from outside the key's IP allowlist.
            Distinguish them by `detail`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
              examples:
                Missing or invalid credentials:
                  summary: No x-api-key header, or the key failed validation
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Other application:
                  summary: >-
                    A valid key that belongs to a different application than the
                    session
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without decisions write:
                  summary: 'Scoped key lacks decisions: write'
                  value:
                    detail: This API key has no write access to decisions.
                IP not allowed:
                  summary: Request from outside the key's IP allowlist
                  value:
                    detail: This API key can't be used from this IP address.
        '404':
          description: >-
            The session does not exist, was deleted or is outside a scoped key's
            limits; no party with this UUID exists in your application; or the
            party belongs to another session. Each case has its own `detail`.
            The session lookup runs before the credential check, so an unknown
            `sessionId` returns `404` even without a valid key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
              examples:
                Unknown session:
                  summary: No session with this ID exists, or it was deleted
                  value:
                    detail: Not found.
                Outside key limits:
                  summary: >-
                    The session is outside a scoped key's workflow or
                    approved-only limits
                  value:
                    detail: Session not found.
                Unknown party:
                  summary: No party with this UUID in your application
                  value:
                    detail: No BusinessParty matches the given query.
                Party of another session:
                  summary: partyUuid exists but belongs to a different session
                  value:
                    detail: Party does not belong to the given session.
        '409':
          description: >-
            The party's KYC session was not deleted (it still exists, the party
            never had one, or the party is a company), so there is nothing to
            replace. Branch on `code`.
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                  - code
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
                  code:
                    type: string
                    enum:
                      - kyb_party_kyc_session_not_deleted
                    description: Stable machine-readable error code.
              example:
                detail: >-
                  This party's KYC session has not been deleted, so it cannot be
                  regenerated.
                code: kyb_party_kyc_session_not_deleted
        '429':
          description: >-
            Rate limit exceeded: 300 write (POST, PATCH, DELETE) requests per
            minute per API key. Wait `Retry-After` seconds before retrying; the
            `X-RateLimit-*` headers show the budget.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
              examples:
                Rate limited:
                  summary: Budget for the current minute exhausted
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      requests per minute.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              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: |-
            import os

            import requests

            session_id = '33333333-4444-5555-6666-777777777777'
            party_uuid = '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41'
            resp = requests.post(
                f'https://verification.didit.me/v3/session/{session_id}/kyb/parties/{party_uuid}/regenerate/',
                headers={'x-api-key': os.environ['DIDIT_API_KEY']},
                timeout=10,
            )
            resp.raise_for_status()
            party = resp.json()
            print(party['kyc_session_id'], party['kyc_session_status'])
        - lang: javascript
          label: JavaScript
          source: >-
            const sessionId = '33333333-4444-5555-6666-777777777777';

            const partyUuid = '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41';

            const resp = await
            fetch(`https://verification.didit.me/v3/session/${sessionId}/kyb/parties/${partyUuid}/regenerate/`,
            {
              method: 'POST',
              headers: { 'x-api-key': process.env.DIDIT_API_KEY },
            });

            if (!resp.ok) throw new Error(`Regenerate failed: ${resp.status}`);

            const party = await resp.json();

            console.log(party.kyc_session_id, party.kyc_session_status);
components:
  schemas:
    KYBKeyPeopleParty:
      type: object
      description: >-
        A Key People party of a Business Verification (KYB) session, with its
        child verification. The same party appears in
        `key_people_checks[].submitted.parties[]` of the business session
        decision.
      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: Party identifier.
        entity_type:
          type: string
          enum:
            - person
            - company
          description: Whether the party is an individual or a company.
        source:
          type: string
          enum:
            - REGISTRY
            - USER
          description: >-
            `REGISTRY`: taken from the company registry. `USER`: entered in the
            Key People screen.
        name:
          type: string
          description: Display name of the party.
        first_name:
          type: string
          nullable: true
          description: First name (persons).
        last_name:
          type: string
          nullable: true
          description: Last name (persons).
        company_name:
          type: string
          nullable: true
          description: Company name (company parties).
        registration_number:
          type: string
          nullable: true
          description: Company registration number (company parties).
        email:
          type: string
          format: email
          nullable: true
          description: Email the verification link is sent to.
        nationality:
          type: string
          nullable: true
          description: Nationality for persons, country of incorporation for companies.
        phone_number:
          type: string
          nullable: true
          description: Phone number collected for the party.
        date_of_birth:
          type: string
          format: date
          nullable: true
          description: Date of birth (persons).
        position:
          type: string
          nullable: true
          description: Free-text job title (persons).
        custom_fields:
          type: object
          additionalProperties: true
          description: >-
            Workflow-defined custom fields collected for the party, keyed by
            field key.
        is_active:
          type: boolean
          description: Whether the party is active.
        is_skipped:
          type: boolean
          description: >-
            Whether the party is exempt from verification. Regenerating clears
            it.
        requires_verification:
          type: boolean
          description: >-
            Whether the role and ownership rules require a verification for this
            party.
        roles:
          type: array
          description: Roles the party holds in the company.
          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: Role code.
              ownership_percent:
                type: number
                nullable: true
                description: Ownership percentage for this role, when known.
              voting_percent:
                type: number
                nullable: true
                description: Voting-rights percentage for this role, when known.
        kyc_session_id:
          type: string
          format: uuid
          nullable: true
          description: Child individual KYC session (persons).
        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: >-
            Status of the child KYC session. A deleted session keeps the status
            it had when it was deleted.
        kyc_session_url:
          type: string
          format: uri
          nullable: true
          description: >-
            Hosted link of the child KYC session. `null` when there is none or
            it was deleted, and for a scoped API key without `sessions: write`.
        kyc_session_deleted:
          type: boolean
          description: The child KYC session was deleted, so it can never settle.
        kyb_sub_session_id:
          type: string
          format: uuid
          nullable: true
          description: Child KYB session (company parties).
        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: Status of the child KYB session.
        kyb_sub_session_url:
          type: string
          format: uri
          nullable: true
          description: >-
            Hosted link of the child KYB session, with the same `null` rules as
            `kyc_session_url`.
        kyb_sub_session_deleted:
          type: boolean
          description: Company-party counterpart of `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: Type of the workflow the child session runs.
        verification_workflow_id:
          type: string
          format: uuid
          nullable: true
          description: Workflow the child session runs.
        verification_workflow_label:
          type: string
          nullable: true
          description: Label of that workflow.
        verification_workflow_features:
          type: array
          nullable: true
          description: Features of the child session's workflow with their current status.
          items:
            type: object
            required:
              - feature
              - status
            properties:
              feature:
                type: string
                description: Feature code, for example `ID_VERIFICATION` or `LIVENESS`.
              status:
                type: string
                description: Feature status, `Not Finished` until it runs.
        didit_internal_id:
          type: string
          format: uuid
          nullable: true
          description: Didit's identifier of the verified person, once known.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your application's API key, from Developers -> API keys in the Business
        Console. The primary key has full access. A named key can be scoped:
        none, read or write per resource, limited to some workflows or to
        approved sessions, to a list of IP addresses, and to an expiry date. 401
        means the key is missing, wrong, revoked or expired; 403 means the key
        has no access to this resource or action, or the request came from an
        address outside its IP list; 404 on a session route means the session is
        outside the key's workflows or statuses. A key without media access
        receives image, video and PDF URLs as null, and a key without sessions
        write receives session links and tokens as null. See
        https://docs.didit.me/console/api-keys.

````

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