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

# addDocument



## OpenAPI

````yaml post /api/customer/{customerId}/document
openapi: 3.1.0
info:
  description: Api Documentation
  version: '3.0'
  title: Api Documentation
  termsOfService: urn:tos
  contact: {}
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.artemis.cynopsis.co
security: []
tags:
  - name: app-config-controller
    description: App Config Controller
  - name: asia-verify-controller
    description: Asia Verify Controller
  - name: authentication-controller
    description: Authentication Controller
  - name: authentication-manager-controller
    description: Authentication Manager Controller
  - name: basic-error-controller
    description: Basic Error Controller
  - name: comment-controller
    description: Comment Controller
  - name: customer-controller
    description: Customer Controller
  - name: dashboard-controller
    description: Dashboard Controller
  - name: domain-controller
    description: Domain Controller
  - name: expiring-document-controller
    description: Expiring Document Controller
  - name: hand-shake-controller
    description: Hand Shake Controller
  - name: media-controller
    description: Media Controller
  - name: on-going-due-diligent-controller
    description: On Going Due Diligent Controller
  - name: own-restricted-list-controller
    description: Own Restricted List Controller
  - name: periodic-review-controller
    description: Periodic Review Controller
  - name: quick-scan-controller
    description: Quick Scan Controller
  - name: user-controller
    description: User Controller
paths:
  /api/customer/{customerId}/document:
    post:
      tags:
        - customer-controller
      summary: addDocument
      operationId: addDocumentUsingPOST
      parameters:
        - name: customerId
          in: path
          description: customerId
          required: true
          schema:
            type: integer
            format: int64
        - name: X-Domain-ID
          in: header
          description: X-Domain-ID
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: '#/components/requestBodies/addDocumentUsingPOST'
      responses:
        '200':
          description: Document uploaded successfully
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '415':
          description: Unsupported Media Type
        '500':
          description: Internal Server Error
      security:
        - OAuth2_Client_Credentials: []
        - OAuth2_Password: []
      x-codeSamples:
        - lang: cURL
          label: Upload (front + document)
          source: |
            curl -X POST "{{backend_url}}/api/customer/{customerId}/document" \
              -H "Authorization: Bearer <token>" \
              -H "X-Domain-ID: 6603" \
              -F "front=@front.png;type=image/png" \
              -F 'document={"type":"NATIONAL_ID","number":"S1234567A"};type=application/json'
        - lang: cURL
          label: Upload (front + back + document)
          source: |
            curl -X POST "{{backend_url}}/api/customer/{customerId}/document" \
              -H "Authorization: Bearer <token>" \
              -H "X-Domain-ID: 6603" \
              -F "front=@front.png;type=image/png" \
              -F "back=@back.png;type=image/png" \
              -F 'document={"type":"NATIONAL_ID","number":"S1234567A"};type=application/json'
components:
  requestBodies:
    addDocumentUsingPOST:
      required: true
      content:
        multipart/form-data:
          schema:
            type: object
            properties:
              front:
                type: string
                format: binary
                description: Front image file (required)
              back:
                type: string
                format: binary
                description: Back image file (optional)
              document:
                type: object
                description: JSON metadata for the document
                properties:
                  type:
                    type: string
                    example: NATIONAL_ID
                  number:
                    type: string
                    example: S1234567A
                  authenticity:
                    type: string
                    example: ORIGINAL
                  issueDate:
                    type: string
                    format: date
                    example: '2020-01-01T00:00:00.000Z'
                  expiryDate:
                    type: string
                    format: date
                    example: '2030-01-01T00:00:00.000Z'
                  showExpiryNotification:
                    type: boolean
                    example: true
            required:
              - front
              - document
          encoding:
            front:
              contentType: image/*
            back:
              contentType: image/*
            document:
              contentType: application/json
  securitySchemes:
    OAuth2_Client_Credentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://crm.cynopsis.co/oauth/token
          scopes: {}
    OAuth2_Password:
      type: oauth2
      flows:
        password:
          tokenUrl: https://crm.cynopsis.co/oauth/token
          scopes: {}

````