> ## 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 की होस्टेड पाइपलाइन का OCR और जाँच भी मिलेगी।



## OpenAPI

````yaml hi/openapi-25.json POST /v3/session/{sessionId}/kyb/documents/
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/documents/:
    post:
      tags:
        - Sessions
      summary: सत्र में KYB दस्तावेज़ अपलोड करें
      description: >-
        होस्ट किए गए पेज के बजाय अपने स्वयं के सर्वर से व्यवसाय सत्यापन सत्र के
        KYB दस्तावेज़ चरण में एक या अधिक कॉर्पोरेट दस्तावेज़ (निगमन के लेख,
        शेयरधारक रजिस्टर, निगमन प्रमाणपत्र, ...) अपलोड करें। Didit होस्ट की गई
        पाइपलाइन चलाता है: संपीड़न, OCR, छेड़छाड़ और क्रॉस-दस्तावेज़ जांच,
        दस्तावेज़ समूहीकरण, और आवश्यक दस्तावेज़ समूह संतुष्ट होने पर सत्र को आगे
        बढ़ाता है। इस चरण के लिए एक समान शुल्क लगता है, चाहे आप कितनी भी फ़ाइलें
        भेजें। सत्र खुला होना चाहिए और KYB दस्तावेज़ चरण में होना चाहिए, और
        रजिस्ट्री चरण में चुनी गई कंपनी मौजूद होनी चाहिए। दस्तावेज़ों में नामित
        व्यक्तियों को `GET /v3/session/{sessionId}/kyb/extracted-parties/` के
        साथ पढ़ें। `write:businesses` आवश्यक है।
      operationId: post_v3_session_kyb_documents
      parameters:
        - name: sessionId
          in: path
          required: true
          description: >-
            व्यवसाय सत्यापन (KYB) सत्र का UUID। यह API कुंजी के एप्लिकेशन से
            संबंधित होना चाहिए।
          schema:
            type: string
            format: uuid
            example: 33333333-4444-5555-6666-777777777777
        - name: node_id
          in: query
          required: false
          description: >-
            KYB चरण का वर्कफ़्लो नोड। केवल तभी आवश्यक जब वर्कफ़्लो में एक से
            अधिक KYB नोड हों; डिफ़ॉल्ट रूप से Didit सत्र के अपने नोड का उपयोग
            करता है।
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - documents
              properties:
                documents:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: >-
                    अपलोड करने के लिए फ़ाइलें: JPG, JPEG, PNG, TIFF, WEBP, PDF
                    या उनका ZIP संग्रह। कम्प्रेशन से पहले 50 MB तक की PDF, 6 MB
                    तक की फ़ोटो।
                document_passwords:
                  type: array
                  items:
                    type: string
                  description: >-
                    समान क्रम में, `documents` में प्रति फ़ाइल एक प्रविष्टि:
                    संरक्षित PDF का पासवर्ड, किसी भी अन्य फ़ाइल के लिए खाली।
                document_group:
                  type: string
                  enum:
                    - LEGAL_PRESENCE
                    - COMPANY_DETAILS
                    - OWNERSHIP_STRUCTURE
                    - REPRESENTATIVES_AUTHORIZATION
                  description: वह आवश्यक दस्तावेज़ समूह जिसके लिए यह अपलोड उत्तर है।
                locale:
                  type: string
                  maxLength: 10
                  description: >-
                    अगले चरण के रिस्पॉन्स का अनुवाद करने के लिए उपयोग किया जाने
                    वाला लोकेल।
      responses:
        '200':
          description: >-
            दस्तावेज़ संसाधित किए गए। जब प्रत्येक आवश्यक समूह संतुष्ट हो जाता है
            तो सत्र आगे बढ़ता है और `next_step` अगले चरण का नाम बताता है; अन्यथा
            यह दस्तावेज़ चरण पर ही रहता है और `document_groups` व
            `document_answer` बताते हैं कि अभी क्या कमी है।
          content:
            application/json:
              schema:
                type: object
                properties:
                  valid:
                    type: boolean
                  next_step:
                    type: string
                    nullable: true
                    description: अपलोड के बाद सत्र जिस चरण पर है।
                  kyb_status:
                    type: string
                    description: कंपनी जांच की स्थिति।
                  document_answer:
                    type: object
                    additionalProperties: true
                    description: प्रति अपलोड किए गए दस्तावेज़ का परिणाम और शेष बचे अपलोड।
                additionalProperties: true
              example:
                valid: true
                next_step: KYB_KEY_PEOPLE
                kyb_status: In Progress
        '400':
          description: >-
            एक दस्तावेज़ अस्वीकार कर दिया गया (छेड़छाड़, अपठनीय या असमर्थित) या
            सत्र में अभी तक कोई KYB कंपनी नहीं है। प्रयास शेष रहने तक किसी अन्य
            फ़ाइल के साथ पुनः प्रयास करें।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: मानव-पठनीय त्रुटि संदेश।
              example:
                message: No KYB company found. Submit company data first.
        '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.
        '402':
          description: दस्तावेज़ चरण के लिए संगठन के पास कोई क्रेडिट नहीं बचा है।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: मानव-पठनीय त्रुटि संदेश।
              example:
                detail: Insufficient credits.
        '403':
          description: >-
            प्रमाणीकरण या प्राधिकरण विफलता। अनुपस्थित कुंजी `403` लौटाती है, और
            किसी अन्य एप्लिकेशन की कुंजी, इस endpoint के लिए आवश्यक अनुमति के
            बिना वाली स्कोप्ड कुंजी, तथा कुंजी की IP अनुमति सूची (allowlist) के
            बाहर से किया गया अनुरोध भी यही लौटाता है; गलत, निरस्त या समय-सीमा
            समाप्त कुंजी `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`) या KYB दस्तावेज़
            चरण पर नहीं है (`kyb_step_mismatch`, जिसमें `next_step` उस चरण का
            नाम बताता है जिस पर वह है)।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: मानव-पठनीय त्रुटि संदेश।
                  code:
                    type: string
                  next_step:
                    type: string
              example:
                detail: The session is not on the step this operation completes.
                code: kyb_step_mismatch
                next_step: KYB_REGISTRY
        '429':
          description: >-
            रेट लिमिट पार हो गई: प्रति मिनट प्रति API कुंजी 300 राइट (POST,
            PATCH, DELETE) अनुरोध। पुनः प्रयास करने से पहले `Retry-After` सेकंड
            प्रतीक्षा करें; `X-RateLimit-*` हेडर बजट दिखाते हैं।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: मानव-पठनीय त्रुटि संदेश।
              examples:
                Rate limited:
                  summary: वर्तमान मिनट का बजट समाप्त हो गया
                  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
        '503':
          $ref: '#/components/responses/DocumentProcessingBusy'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.upload_kyb_documents(
                "33333333-4444-5555-6666-777777777777",
                documents=[open("document.pdf", "rb")],
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit, { fileFromPath } from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const result = await
            didit.sessions.uploadKybDocuments("33333333-4444-5555-6666-777777777777",
            {
              documents: [await fileFromPath("document.pdf")],
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UploadKYBDocuments(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsUploadKYBDocumentsParams{\n\tDocuments: []didit.File{didit.FileFromPath(\"document.pdf\")},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.nio.file.Path;

            import java.util.List;

            import me.didit.Didit;

            import me.didit.types.SessionsUploadKybDocumentsParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().uploadKybDocuments("33333333-4444-5555-6666-777777777777",
            SessionsUploadKybDocumentsParams.builder()
                    .documents(List.of(Path.of("document.pdf")))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;

            use Didit\File;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $result =
            $didit->sessions->uploadKybDocuments('33333333-4444-5555-6666-777777777777',
            [
                'documents' => [File::fromPath('document.pdf')],
            ]);

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

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

            result = didit.sessions.upload_kyb_documents(
              "33333333-4444-5555-6666-777777777777",
              documents: [Pathname("document.pdf")]
            )
            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.UploadKybDocumentsAsync("33333333-4444-5555-6666-777777777777",
            new SessionsUploadKybDocumentsParams

            {
                Documents = new FileUpload[] { FileUpload.FromPath("document.pdf") },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  responses:
    DocumentProcessingBusy:
      description: >-
        वर्तमान में बहुत सारे दस्तावेज़ प्रोसेस किए जा रहे हैं, इसलिए यह अपलोड
        प्रोसेस नहीं हुआ: कुछ भी संग्रहीत नहीं किया गया और किसी भी प्रयास का
        उपयोग नहीं किया गया। `Retry-After` में दिए गए सेकंड की संख्या के बाद वही
        फ़ाइल दोबारा भेजें। `code` के आधार पर शाखा चुनें, संदेश टेक्स्ट के आधार
        पर नहीं।
      headers:
        Retry-After:
          description: समान अनुरोध दोबारा भेजने से पहले प्रतीक्षा करने की अवधि (सेकंड में)।
          schema:
            type: integer
            example: 10
      content:
        application/json:
          schema:
            type: object
            required:
              - detail
              - code
            properties:
              detail:
                type: string
              code:
                type: string
                enum:
                  - document_processing_busy
          example:
            detail: We are busy processing documents. Please try again in a moment.
            code: document_processing_busy
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        आपकी एप्लिकेशन की API कुंजी, Business Console में Developers -> API keys
        से। प्राथमिक कुंजी के पास पूर्ण एक्सेस होता है। एक नामित कुंजी को स्कोप
        किया जा सकता है: प्रति संसाधन none, read या write, कुछ वर्कफ़्लो या
        स्वीकृत सत्रों तक सीमित, IP पतों की सूची तक सीमित, और समाप्ति तिथि तक
        सीमित। 401 का अर्थ है कि कुंजी गलत है, निरस्त कर दी गई है या उसकी
        समय-सीमा समाप्त हो गई है; 403 का अर्थ है कि कोई कुंजी नहीं भेजी गई थी,
        कुंजी के पास इस संसाधन या कार्रवाई का एक्सेस नहीं है, या अनुरोध उसकी IP
        सूची से बाहर के पते से आया था; सत्र रूट पर 404 का अर्थ है कि सत्र कुंजी
        के वर्कफ़्लो या स्थितियों से बाहर है। मीडिया एक्सेस के बिना एक कुंजी को
        छवि, वीडियो और PDF URL null के रूप में प्राप्त होते हैं, और सत्र write
        के बिना एक कुंजी को सत्र लिंक और token null के रूप में प्राप्त होते हैं।
        देखें https://docs.didit.me/console/api-keys।

````

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