> ## Documentation Index
> Fetch the complete documentation index at: https://hevninc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload a document straight into one entity's slot



## OpenAPI

````yaml /openapi.json post /api/v1/kyb/b2b/kyb/entities/{entity_id}/documents
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers: []
security: []
paths:
  /api/v1/kyb/b2b/kyb/entities/{entity_id}/documents:
    post:
      tags:
        - B2B
        - kyb
      summary: Upload a document straight into one entity's slot
      operationId: >-
        upload_kyb_entity_document_package_alias_api_v1_kyb_b2b_kyb_entities__entity_id__documents_post
      parameters:
        - name: entity_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Entity Id
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KybEntityDocumentUpload'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDraftInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    KybEntityDocumentUpload:
      properties:
        base64:
          type: string
          title: Base64
        type:
          $ref: '#/components/schemas/DocumentType'
        originName:
          anyOf:
            - type: string
            - type: 'null'
          title: Originname
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      required:
        - base64
        - type
      title: KybEntityDocumentUpload
      description: >-
        Upload a file straight into one entity's document slot.


        Upload, KYB classification and the link to the entity are one request

        because they were one operation all along: a file uploaded but not filed

        is invisible, and a slot pointing at a file that failed to upload is
        worse.
    DocumentDraftInfo:
      properties:
        id:
          type: string
          title: Id
        type:
          $ref: '#/components/schemas/DocumentType'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        originName:
          anyOf:
            - type: string
            - type: 'null'
          title: Originname
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        issueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Issuedate
        expiryDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Expirydate
        content:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Content
        dakotaId:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Document Id
        signature:
          anyOf:
            - $ref: '#/components/schemas/DocumentSignatureInfo'
            - type: 'null'
          description: >-
            Signing state for a HEVN-generated document. ``null`` when the
            document carries no signature blocks, so a plain upload stays plain.
            A stored document is not a signed one — read the state.
      type: object
      required:
        - id
        - type
      title: DocumentDraftInfo
      description: Document info in response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentType:
      type: string
      enum:
        - certificate_of_incorporation
        - formation_document
        - articles_of_incorporation
        - power_of_attorney
        - corporate_structure
        - company_registry_extract
        - corporate_registry_extract
        - shareholder_registry
        - director_structure
        - proof_of_address
        - utility_bill
        - annual_financial_statements
        - articles_of_association
        - audit_report
        - bank_reference_letter
        - bank_statement
        - banking_details
        - birth_certificate
        - business_license
        - business_plan
        - certificate_of_good_standing
        - crypto_statement
        - credit_report
        - criminal_record_check
        - cv_resume
        - driving_license
        - education_certificate
        - financial_projections
        - investment_statement
        - insurance_policy
        - lease_agreement
        - list_of_authorized_signatories
        - marriage_certificate
        - national_id
        - operating_agreement
        - partnership_agreement
        - professional_license
        - regulatory_license
        - reference_letter
        - register_of_members
        - residence_permit
        - shareholding_structure
        - shareholders_agreement
        - social_security_document
        - source_of_funds_declaration
        - tax_identification_document
        - tax_compliance_form
        - tax_returns
        - payslip
        - pitch_deck
        - savings_statement
        - trade_references
        - vat_registration
        - vendor_contracts
        - visa
        - wealth_statement
        - contract
        - invoice
        - loan_agreement
        - subscription_agreement
        - safe_agreement
        - convertible_note
        - promissory_note
        - marketing_material
        - employment_contract
        - authorization_to_act
        - authority_to_bind
        - income_verification_letter
        - source_of_funds
        - source_of_wealth
        - supporting_document
        - memorandum
        - passport_front
        - passport_back
        - id_card_front
        - id_card_back
        - drivers_license_front
        - drivers_license_back
        - residence_permit_front
        - residence_permit_back
        - other
      title: DocumentType
      description: Open internal document type; providers map it to their own taxonomy.
    DocumentSignatureInfo:
      properties:
        state:
          $ref: '#/components/schemas/DocumentSignatureState'
        signatureRequestId:
          anyOf:
            - type: string
            - type: 'null'
          title: Signaturerequestid
        signerEmails:
          items:
            type: string
          type: array
          title: Signeremails
        lastSignerEmail:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastsigneremail
        testMode:
          type: boolean
          title: Testmode
          default: false
      type: object
      required:
        - state
      title: DocumentSignatureInfo
      description: Typed view of the ``content["hellosign"]`` block for API responses.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DocumentSignatureState:
      type: string
      enum:
        - draft
        - sent
        - viewed
        - partially_signed
        - signed
        - declined
        - canceled
        - expired
        - invalid
      title: DocumentSignatureState
      description: >-
        Where one generated document stands with the signing provider.


        A document that exists is not a document that is signed: the UI has to
        tell

        a fresh draft from one waiting on a signer from a completed one.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````