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

# KYB主要人物の下書き削除API

> DiditのKYBセッションAPIで、主要人物の下書きを1件削除します。対象はKYBセッション内の主要人物の下書き1件のみです。



## OpenAPI

````yaml ja/openapi-25.json DELETE /v3/session/{sessionId}/kyb/parties/drafts/{draftId}/
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/drafts/{draftId}/:
    delete:
      tags:
        - Sessions
      summary: KYB当事者の下書きを削除
      description: 当事者のドラフトを1件削除します。申告済みの当事者には影響しません。`write:businesses`が必要です。
      operationId: delete_v3_session_kyb_party_draft
      parameters:
        - name: sessionId
          in: path
          required: true
          description: 法人確認 (KYB) セッションのUUIDです。APIキーのアプリケーションに属している必要があります。
          schema:
            type: string
            format: uuid
            example: 33333333-4444-5555-6666-777777777777
        - name: draftId
          in: path
          required: true
          description: 当事者ドラフトのUUID(作成時に返される`draft_id`)。
          schema:
            type: string
            format: uuid
            example: 5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d
        - name: node_id
          in: query
          required: false
          description: >-
            KYBステップのワークフローノード。ワークフローに複数のKYBノードがある場合にのみ必要です。デフォルトでは、Diditはセッション自身のノードを使用します。
          schema:
            type: string
      responses:
        '204':
          description: ドラフトを削除しました。ボディはありません。
        '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: セッションまたは下書きが存在しないか、セッションがキーのアプリケーション外、またはスコープ付きキーの制限外です。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 人が読めるエラーメッセージ。
              example:
                detail: Session not found.
        '409':
          description: セッションが終了しています（`kyb_session_not_writable`）。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 人が読めるエラーメッセージ。
                  code:
                    type: string
              example:
                detail: This verification session is no longer accepting changes.
                code: kyb_session_not_writable
        '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: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            client.sessions.delete_kyb_party_draft(
                "33333333-4444-5555-6666-777777777777",
                "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d",
            )
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            await didit.sessions.deleteKybPartyDraft(
              "33333333-4444-5555-6666-777777777777",
              "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d",
            );
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Sessions.DeleteKYBPartyDraft(ctx, \"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", didit.SessionsDeleteKYBPartyDraftParams{}); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            client.sessions().deleteKybPartyDraft("33333333-4444-5555-6666-777777777777",
            "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d");
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $didit->sessions->deleteKybPartyDraft('33333333-4444-5555-6666-777777777777',
            '5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d');
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            didit.sessions.delete_kyb_party_draft(
              "33333333-4444-5555-6666-777777777777",
              "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d"
            )
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            await
            client.Sessions.DeleteKybPartyDraftAsync("33333333-4444-5555-6666-777777777777",
            "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d");
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.