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

# Upload KYC or KYB document

> Upload a KYC or KYB document



## OpenAPI

````yaml https://api.conduit.financial/api-docs/2024-12-01/openapi-external.yaml?mode=dynamic post /customers/onboarding/{id}/documents
openapi: 3.0.2
info:
  version: '2024-12-01'
  title: Conduit API
  description: The Conduit Financial API
  contact:
    name: Conduit Support
    email: conduit@conduit.fi
servers:
  - url: https://api.conduit.financial
    description: The Conduit API live environment
  - url: https://api.sandbox.conduit.financial
    description: The Conduit API Sandbox environment
security: []
tags:
  - name: Accounts
    description: |
      Endpoints dealing with accounts.
  - name: Counterparties
    description: |
      Endpoints dealing with counterparties information. 
  - name: Quotes
    description: |
      Endpoints dealing with quotes.
  - name: Transactions
    description: |
      Endpoints dealing with transactions.
  - name: Documents
    description: |
      Endpoints dealing with documents.
  - name: Customers
    description: |
      Endpoints dealing with customer information. 
paths:
  /customers/onboarding/{id}/documents:
    post:
      tags:
        - Customers
      summary: Upload KYC or KYB document
      description: Upload a KYC or KYB document
      operationId: createOnboardingDocument
      parameters:
        - schema:
            $ref: '#/components/schemas/CustomerId'
          required: true
          description: A valid Customer ID
          name: id
          in: path
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateOnboardingDocumentRequest'
            examples:
              'KYC: Front and Back Document':
                summary: 'Front and Back Document: KYC'
                value:
                  name: front and back document
                  purpose: kyc
                  type: driver_license
                  front: base64 encoded front file
                  back: base64 encoded back file
                  controlPersonId: ctl_123
              'KYC : Single Side Document':
                summary: KYC Single Side Document
                value:
                  name: single side document
                  purpose: kyc
                  type: passport
                  file: base64 encoded file
                  controlPersonId: ctl_123
              'KYB: Single Side Document':
                summary: KYB Single Side Document
                value:
                  name: single side document
                  purpose: kyb
                  type: business_license
                  file: base64 encoded file
      responses:
        '201':
          description: Document created successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CreateTransactionDocumentResponse'
                  - description: Document object containing the document ID
                    example:
                      id: doc_2ofTA13AD0xBtbEvBl20aEb1hEu
        '400':
          description: Input validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '403':
          description: Authorization error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '415':
          description: Unsupported media type error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeErrorResponse'
        '429':
          description: Throttling error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
        '500':
          description: Internal Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - apiKey: []
          apiSecret: []
components:
  schemas:
    CustomerId:
      type: string
      pattern: ^cus_[a-zA-Z0-9]{27}$
      description: A valid Customer ID
      example: cus_2ofTA13AD0xBtbEvBl20aEb1hEu
    CreateOnboardingDocumentRequest:
      type: object
      properties:
        name:
          type: string
        purpose:
          type: string
          enum:
            - kyc
            - kyb
            - transaction_document
            - other
        type:
          type: string
          enum:
            - business_license
            - tax_id
            - invoice
            - contract
            - utility_bill
            - source_of_funds
            - shareholder_registry
            - tax_certificate
            - flow_of_funds
            - power_of_attorney
            - directors_registry
            - company_structure_chart
            - bank_statement
            - operating_agreement
            - ein_letter
            - certificate_of_good_standing
            - proof_of_funds
            - partnership_agreement
            - corporate_resolution
            - certificate_of_incorporation
            - certificate_of_registration
            - w9_document
            - wallets
            - audited_accounts
            - organizational_structure_chart
            - articles_of_association
            - insolvency_document
            - aml_audit
            - aml_audit_report
            - financial_regulatory_license
            - anti_bribery_policy
            - cdd_policy
            - reporting_entity_registration_document
            - aml_policy
            - balance_sheet
            - sanctions_screening_policy
            - other
            - proof_of_registered_address
            - proof_of_operating_address
            - board_minutes
            - independent_aml_audit_report
            - compliance_audit_report
            - investment_agreement
            - registration_certificate
            - institutional_investors_shareholder_registry
            - cap_table
            - regulatory_license
            - approval_letter
            - partnership_or_trust_agreement
            - board_resolution
            - passport
            - driver_license
            - national_id
            - proof_of_address
            - selfie
            - selfie_image
            - selfie_video
            - pan_card
            - voter_id_card
            - resident_card
            - ghana_card
            - ghana_ssnit_card
            - kenya_alien_card
            - terms_of_service
            - visa
        metadata:
          type: object
          additionalProperties:
            type: string
        controlPersonId:
          allOf:
            - $ref: '#/components/schemas/ControlPersonId'
            - description: >-
                The ID of the control person who is associated with only for KYC
                documents
        file:
          allOf:
            - $ref: '#/components/schemas/BinaryFile'
            - nullable: true
              description: The file to be uploaded
        front:
          allOf:
            - $ref: '#/components/schemas/BinaryFile'
            - nullable: true
              description: >-
                The front side of the document to be uploaded , only allowed for
                driver_license and national_id documents
        back:
          allOf:
            - $ref: '#/components/schemas/BinaryFile'
            - nullable: true
              description: >-
                The back side of the document to be uploaded , only allowed for
                driver_license and national_id documents
      required:
        - name
        - purpose
        - type
      additionalProperties: false
    CreateTransactionDocumentResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/DocumentId'
      required:
        - id
    BadRequestErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    ForbiddenErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    UnsupportedMediaTypeErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    TooManyRequestsErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    InternalServerErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    ControlPersonId:
      type: string
      pattern: ^ctl_[a-zA-Z0-9]{27}$
      description: A valid Control Person ID
      example: ctl_2ofTA13AD0xBtbEvBl20aEb1hEu
    BinaryFile:
      type: string
      format: binary
    DocumentId:
      type: string
      pattern: ^doc_[a-zA-Z0-9]{27}$
      description: A valid Document ID
      example: doc_2ofTAESrTs4uQ8N3yGBMhGj59jV
  securitySchemes:
    apiKey:
      type: apiKey
      description: Includes an API key in the HTTP headers to authenticate the client.
      name: X-API-Key
      in: header
    apiSecret:
      type: apiKey
      description: Includes an API secret in the HTTP headers to authenticate the client.
      name: X-API-Secret
      in: header

````