> ## 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 transaction supporting document

> Upload a transaction supporting document for a customer



## OpenAPI

````yaml https://api.conduit.financial/api-docs/2024-12-01/openapi-external.yaml?mode=dynamic post /customers/{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/{id}/documents:
    post:
      tags:
        - Customers
      summary: Upload transaction supporting document
      description: Upload a transaction supporting document for a customer
      operationId: createCustomerDocument
      parameters:
        - schema:
            $ref: '#/components/schemas/CustomerId'
          required: true
          description: A valid Customer ID
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerDocumentRequest'
      responses:
        '201':
          description: Document created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCustomerDocumentResponse'
        '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
    CreateCustomerDocumentRequest:
      type: object
      properties:
        documentId:
          $ref: '#/components/schemas/DocumentId'
        purpose:
          $ref: '#/components/schemas/DocumentPurpose'
        type:
          $ref: '#/components/schemas/DocumentType'
        name:
          type: string
      required:
        - documentId
        - type
        - name
      description: Request to upload a customer document
      example:
        documentId: doc_2ofTA13AD0xBtbEvBl20aEb1hEu
        purpose: transaction_justification
        type: contract
        name: Contract
    CreateCustomerDocumentResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - createdAt
      description: Customer document creation response
      example:
        id: doc_2ofTA13AD0xBtbEvBl20aEb1hEu
        createdAt: '2024-12-31T23:59:59Z'
    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
    DocumentId:
      type: string
      pattern: ^doc_[a-zA-Z0-9]{27}$
      description: A valid Document ID
      example: doc_2ofTAESrTs4uQ8N3yGBMhGj59jV
    DocumentPurpose:
      type: string
      enum:
        - transaction_justification
      default: transaction_justification
      description: Purpose of the document
      example: transaction_justification
    DocumentType:
      type: string
      enum:
        - contract
        - invoice
      description: Type of document
      example: contract
  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

````