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

# Subir Documentos de Identidad KYC y KYB

> Upload a document for a customer.

Sube un documento de identidad para un cliente o representante empresarial como parte del proceso de verificación KYC o KYB. Los documentos se envían como datos de formulario multipart. Los formatos de archivo aceptados son PDF, JPEG, PNG, HEIC y TIFF, con un tamaño máximo de archivo de 15 MB. Los campos `target` y `documentType` determinan cómo SpherePay enruta y procesa la carga — los clientes individuales, los clientes empresariales y los representantes empresariales tienen cada uno su propio conjunto de tipos de documentos aceptados.

<Note>
  Los documentos para clientes individuales se suben con `target: "customer"`. Los documentos para representantes empresariales (UBOs) usan `target: "business_representative"` y el `targetId` debe ser el ID del representante, no el del cliente.
</Note>


## OpenAPI

````yaml openapi/spherepay.yaml POST /v2/document
openapi: 3.0.0
info:
  title: ''
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.spherepay.co
    description: Production
security:
  - bearer: []
tags: []
paths:
  /v2/document:
    post:
      summary: Upload Document
      description: Upload a document for a customer.
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              oneOf:
                - title: Individual
                  description: >-
                    Upload documents for individual customers. Supports identity
                    documents (with country and side) and other documents
                    (liveness report, tax forms, source of funds).
                  example:
                    targetId: customer_66c4168d418a410eae282b83883bdc39
                    target: customer
                    documentType: passport
                    country: USA
                    side: front
                    description: Passport photo page
                    file: (binary)
                  oneOf:
                    - title: ID Document
                      description: >-
                        Upload identity documents for individual customers.
                        Requires country of issuance and optionally the document
                        side (front/back).
                      type: object
                      properties:
                        targetId:
                          description: >-
                            The unique identifier of the target entity for which
                            the document is being uploaded
                          example: customer_66c4168d418a410eae282b83883bdc39
                          type: string
                          minLength: 1
                        description:
                          description: Optional description or notes about the document
                          example: Front side of driver's license
                          type: string
                        file:
                          description: >-
                            The document file to upload. Accepted formats: PDF,
                            JPEG, PNG. Maximum file size: 10MB
                          type: string
                          format: binary
                        country:
                          description: >-
                            The ISO3166-1 Alpha-3 country code associated with
                            the document (e.g., USA, GBR, FRA). See [Country
                            Codes](/concepts/reference/supported-countries).
                          example: USA
                          type: string
                        side:
                          description: >-
                            The side of the document if it has multiple sides
                            (e.g., front, back). Leave undefined for
                            single-sided documents.
                          example: front
                          type: string
                          enum:
                            - front
                            - back
                        target:
                          description: >-
                            The target entity for which the document is being
                            uploaded
                          example: customer
                          type: string
                          enum:
                            - customer
                        documentType:
                          description: >-
                            ID documents for individual customers. See [Document
                            Guideline](/concepts/onboarding/identification-types)
                            for requirements.
                          example: passport
                          type: string
                          enum:
                            - passport
                            - drivers
                            - id_card
                            - residence_permit
                      required:
                        - targetId
                        - file
                        - country
                        - target
                        - documentType
                    - title: Other Document
                      description: >-
                        Upload non-ID documents for individual customers, such
                        as liveness report, tax forms, or source-of-funds
                        documentation.
                      type: object
                      properties:
                        targetId:
                          description: >-
                            The unique identifier of the target entity for which
                            the document is being uploaded
                          example: customer_66c4168d418a410eae282b83883bdc39
                          type: string
                          minLength: 1
                        description:
                          description: Optional description or notes about the document
                          example: Front side of driver's license
                          type: string
                        file:
                          description: >-
                            The document file to upload. Accepted formats: PDF,
                            JPEG, PNG. Maximum file size: 10MB
                          type: string
                          format: binary
                        target:
                          description: >-
                            The target entity for which the document is being
                            uploaded
                          example: customer
                          type: string
                          enum:
                            - customer
                        documentType:
                          description: Non-ID documents for individual customers.
                          example: proof_of_address_document
                          type: string
                          enum:
                            - proof_of_address_document
                            - liveness_report_document
                            - w8_ben_document
                            - source_of_funds_document
                      required:
                        - targetId
                        - file
                        - target
                        - documentType
                - title: Business
                  description: >-
                    Upload company documents for business customers, such as
                    incorporation certificates, shareholder registries, or proof
                    of address.
                  example:
                    targetId: customer_66c4168d418a410eae282b83883bdc39
                    target: customer
                    documentType: incorporation_cert_document
                    description: Certificate of incorporation
                    file: (binary)
                  type: object
                  properties:
                    targetId:
                      description: >-
                        The unique identifier of the target entity for which the
                        document is being uploaded
                      example: customer_66c4168d418a410eae282b83883bdc39
                      type: string
                      minLength: 1
                    description:
                      description: Optional description or notes about the document
                      example: Front side of driver's license
                      type: string
                    file:
                      description: >-
                        The document file to upload. Accepted formats: PDF,
                        JPEG, PNG. Maximum file size: 10MB
                      type: string
                      format: binary
                    target:
                      description: >-
                        The target entity for which the document is being
                        uploaded
                      example: customer
                      type: string
                      enum:
                        - customer
                    documentType:
                      description: >-
                        Company documents for business customers. See [Business
                        Document
                        Guideline](/concepts/onboarding/identification-types)
                        for requirements.
                      example: incorporation_cert_document
                      type: string
                      enum:
                        - proof_of_address_document
                        - incorporation_cert_document
                        - incorporation_articles_document
                        - shareholder_registry_document
                        - directors_registry_document
                        - w8_ben_e_document
                        - corporate_resolution_document
                        - bank_statement_document
                        - financial_statements_document
                        - source_of_funds_document
                        - regulated_activity_document
                        - flow_of_funds_document
                        - proof_of_nature_of_business_document
                  required:
                    - targetId
                    - file
                    - target
                    - documentType
                - title: UBO
                  description: >-
                    Upload documents for business representatives. Supports
                    identity documents (with country and side) and proof of
                    address.
                  example:
                    targetId: business_representative_66c4168d418a410eae282b83883bdc39
                    target: business_representative
                    documentType: passport
                    country: USA
                    side: front
                    description: Passport photo page
                    file: (binary)
                  oneOf:
                    - title: ID Document
                      description: Upload an ID document for a business representative.
                      type: object
                      properties:
                        targetId:
                          description: >-
                            The unique identifier of the target entity for which
                            the document is being uploaded
                          example: customer_66c4168d418a410eae282b83883bdc39
                          type: string
                          minLength: 1
                        description:
                          description: Optional description or notes about the document
                          example: Front side of driver's license
                          type: string
                        file:
                          description: >-
                            The document file to upload. Accepted formats: PDF,
                            JPEG, PNG. Maximum file size: 10MB
                          type: string
                          format: binary
                        country:
                          description: >-
                            The ISO3166-1 Alpha-3 country code associated with
                            the document (e.g., USA, GBR, FRA). See [Country
                            Codes](/concepts/reference/supported-countries).
                          example: USA
                          type: string
                        side:
                          description: >-
                            The side of the document if it has multiple sides
                            (e.g., front, back). Leave undefined for
                            single-sided documents.
                          example: front
                          type: string
                          enum:
                            - front
                            - back
                        target:
                          description: >-
                            The target entity for which the document is being
                            uploaded
                          example: business_representative
                          type: string
                          enum:
                            - business_representative
                        documentType:
                          description: >-
                            ID documents for business representatives. See
                            [Document
                            Guideline](/concepts/onboarding/identification-types)
                            for requirements.
                          example: passport
                          type: string
                          enum:
                            - passport
                            - drivers
                            - id_card
                            - residence_permit
                      required:
                        - targetId
                        - file
                        - country
                        - target
                        - documentType
                    - title: Other Document
                      description: Upload other documents for business representatives.
                      type: object
                      properties:
                        targetId:
                          description: >-
                            The unique identifier of the target entity for which
                            the document is being uploaded
                          example: customer_66c4168d418a410eae282b83883bdc39
                          type: string
                          minLength: 1
                        description:
                          description: Optional description or notes about the document
                          example: Front side of driver's license
                          type: string
                        file:
                          description: >-
                            The document file to upload. Accepted formats: PDF,
                            JPEG, PNG. Maximum file size: 10MB
                          type: string
                          format: binary
                        target:
                          description: >-
                            The target entity for which the document is being
                            uploaded
                          example: business_representative
                          type: string
                          enum:
                            - business_representative
                        documentType:
                          description: Other documents for business representatives.
                          example: proof_of_address_document
                          type: string
                          enum:
                            - proof_of_address_document
                            - liveness_report_document
                            - w9_document
                            - w8_ben_document
                            - source_of_funds_document
                      required:
                        - targetId
                        - file
                        - target
                        - documentType
                - title: Transfer
                  description: >-
                    Upload supporting documents for transfers/payouts (e.g.,
                    invoices, contracts). Documents are uploaded first before
                    linking to a transfer later.
                  example:
                    target: transfer
                    description: Invoice for third-party payment
                    file: (binary)
                  type: object
                  properties:
                    target:
                      description: >-
                        The target entity for which the document is being
                        uploaded
                      example: transfer
                      type: string
                      enum:
                        - transfer
                    description:
                      description: Optional description or notes about the document
                      example: Invoice for third-party payment
                      type: string
                    file:
                      description: >-
                        The document file to upload. Accepted formats: PDF,
                        JPEG, PNG. Maximum file size: 10MB
                      type: string
                      format: binary
                  required:
                    - target
                    - file
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - title: Individual
                    description: >-
                      Response containing an uploaded document for an individual
                      customer.
                    example:
                      id: documentFile_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
                      targetId: customer_66c4168d418a410eae282b83883bdc39
                      target: customer
                      documentType: passport
                      country: USA
                      side: front
                      description: Passport photo page
                      fileName: passport_front_20250101.pdf
                      fileSize: 2048576
                      mimeType: application/pdf
                      createdAt: '2025-12-31T10:30:00.000Z'
                    oneOf:
                      - title: ID Document
                        description: >-
                          Response for an ID document uploaded for an individual
                          customer.
                        type: object
                        properties:
                          id:
                            description: The unique identifier of the document
                            example: documentFile_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
                            type: string
                          targetId:
                            description: >-
                              The unique identifier of the target entity for
                              which the document is being uploaded
                            example: customer_66c4168d418a410eae282b83883bdc39
                            type: string
                          createdAt:
                            description: The date and time the document was created
                            example: '2025-12-31T10:30:00.000Z'
                            type: string
                          fileName:
                            description: The name of the document file
                            example: passport_front_20250101.pdf
                            type: string
                          fileSize:
                            description: The size of the document in bytes
                            example: 2048576
                            type: number
                          mimeType:
                            description: The MIME type of the document file
                            example: application/pdf
                            type: string
                          description:
                            description: The description of the document
                            example: Passport photo page
                            type: string
                          target:
                            description: >-
                              The target entity for which the document is being
                              uploaded
                            example: customer
                            type: string
                            enum:
                              - customer
                          documentType:
                            description: The type of the document
                            example: passport
                            type: string
                            enum:
                              - drivers
                              - passport
                              - id_card
                              - residence_permit
                          country:
                            description: >-
                              The ISO3166-1 Alpha-3 country code associated with
                              the document (e.g., USA, GBR, FRA)
                            example: USA
                            type: string
                          side:
                            description: >-
                              The side of the document if it has multiple sides
                              (e.g., front, back). Leave undefined for
                              single-sided documents.
                            example: front
                            type: string
                            enum:
                              - front
                              - back
                        required:
                          - id
                          - targetId
                          - createdAt
                          - fileName
                          - fileSize
                          - mimeType
                          - description
                          - target
                          - documentType
                          - country
                          - side
                      - title: Other Document
                        description: >-
                          Response for a non-identity individual-customer
                          document: proof_of_address_document,
                          liveness_report_document, w8_ben_document, or
                          source_of_funds_document.
                        type: object
                        properties:
                          id:
                            description: The unique identifier of the document
                            example: documentFile_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
                            type: string
                          targetId:
                            description: >-
                              The unique identifier of the target entity for
                              which the document is being uploaded
                            example: customer_66c4168d418a410eae282b83883bdc39
                            type: string
                          createdAt:
                            description: The date and time the document was created
                            example: '2025-12-31T10:30:00.000Z'
                            type: string
                          fileName:
                            description: The name of the document file
                            example: passport_front_20250101.pdf
                            type: string
                          fileSize:
                            description: The size of the document in bytes
                            example: 2048576
                            type: number
                          mimeType:
                            description: The MIME type of the document file
                            example: application/pdf
                            type: string
                          description:
                            description: The description of the document
                            example: Passport photo page
                            type: string
                          target:
                            description: >-
                              The target entity for which the document is being
                              uploaded
                            example: customer
                            type: string
                            enum:
                              - customer
                          documentType:
                            description: >-
                              Non-ID document type (liveness report, tax form,
                              or source-of-funds declaration)
                            example: proof_of_address_document
                            type: string
                            enum:
                              - passport
                              - drivers
                              - id_card
                              - residence_permit
                              - proof_of_address_document
                              - liveness_report_document
                              - w8_ben_document
                              - source_of_funds_document
                          country:
                            description: >-
                              Country associated with the document when one was
                              resolved for the upload
                            example: DEU
                            type: string
                          side:
                            description: Document side, if applicable
                            example: null
                            type: string
                            enum:
                              - front
                              - back
                        required:
                          - id
                          - targetId
                          - createdAt
                          - fileName
                          - fileSize
                          - mimeType
                          - description
                          - target
                          - documentType
                          - country
                          - side
                  - title: Business Customer Document
                    description: >-
                      Response containing an uploaded company document for a
                      business customer.
                    example:
                      id: documentFile_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7
                      targetId: customer_66c4168d418a410eae282b83883bdc39
                      target: customer
                      documentType: incorporation_cert_document
                      description: Certificate of incorporation
                      fileName: incorporation_cert.pdf
                      fileSize: 1024000
                      mimeType: application/pdf
                      createdAt: '2025-12-31T10:30:00.000Z'
                    type: object
                    properties:
                      id:
                        description: The unique identifier of the document
                        example: documentFile_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
                        type: string
                      targetId:
                        description: >-
                          The unique identifier of the target entity for which
                          the document is being uploaded
                        example: customer_66c4168d418a410eae282b83883bdc39
                        type: string
                      createdAt:
                        description: The date and time the document was created
                        example: '2025-12-31T10:30:00.000Z'
                        type: string
                      fileName:
                        description: The name of the document file
                        example: passport_front_20250101.pdf
                        type: string
                      fileSize:
                        description: The size of the document in bytes
                        example: 2048576
                        type: number
                      mimeType:
                        description: The MIME type of the document file
                        example: application/pdf
                        type: string
                      description:
                        description: The description of the document
                        example: Passport photo page
                        type: string
                      target:
                        description: >-
                          The target entity for which the document is being
                          uploaded
                        example: customer
                        type: string
                        enum:
                          - customer
                      documentType:
                        description: The type of the document
                        example: incorporation_cert_document
                        type: string
                        enum:
                          - proof_of_address_document
                          - incorporation_cert_document
                          - incorporation_articles_document
                          - shareholder_registry_document
                          - directors_registry_document
                          - w8_ben_e_document
                          - corporate_resolution_document
                          - bank_statement_document
                          - financial_statements_document
                          - source_of_funds_document
                          - regulated_activity_document
                          - flow_of_funds_document
                          - proof_of_nature_of_business_document
                    required:
                      - id
                      - targetId
                      - createdAt
                      - fileName
                      - fileSize
                      - mimeType
                      - description
                      - target
                      - documentType
                  - title: Business Representative Document
                    description: >-
                      Response containing an uploaded document for a business
                      representative (identity document, proof of address, or
                      liveness report).
                    example:
                      id: documentFile_c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8
                      targetId: business_representative_66c4168d418a410eae282b83883bdc39
                      target: business_representative
                      documentType: passport
                      country: USA
                      side: front
                      description: Passport photo page
                      fileName: passport_front_20250101.pdf
                      fileSize: 2048576
                      mimeType: application/pdf
                      createdAt: '2025-12-31T10:30:00.000Z'
                    oneOf:
                      - title: ID Document
                        description: >-
                          Response for an ID document uploaded for a business
                          representative.
                        type: object
                        properties:
                          id:
                            description: The unique identifier of the document
                            example: documentFile_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
                            type: string
                          targetId:
                            description: >-
                              The unique identifier of the target entity for
                              which the document is being uploaded
                            example: customer_66c4168d418a410eae282b83883bdc39
                            type: string
                          createdAt:
                            description: The date and time the document was created
                            example: '2025-12-31T10:30:00.000Z'
                            type: string
                          fileName:
                            description: The name of the document file
                            example: passport_front_20250101.pdf
                            type: string
                          fileSize:
                            description: The size of the document in bytes
                            example: 2048576
                            type: number
                          mimeType:
                            description: The MIME type of the document file
                            example: application/pdf
                            type: string
                          description:
                            description: The description of the document
                            example: Passport photo page
                            type: string
                          target:
                            type: string
                            enum:
                              - business_representative
                          documentType:
                            description: The type of the document
                            example: passport
                            type: string
                            enum:
                              - drivers
                              - passport
                              - id_card
                              - residence_permit
                          country:
                            description: >-
                              The ISO3166-1 Alpha-3 country code associated with
                              the document (e.g., USA, GBR, FRA)
                            example: USA
                            type: string
                          side:
                            description: >-
                              The side of the document if it has multiple sides
                              (e.g., front, back). Leave undefined for
                              single-sided documents.
                            example: front
                            type: string
                            enum:
                              - front
                              - back
                        required:
                          - id
                          - targetId
                          - createdAt
                          - fileName
                          - fileSize
                          - mimeType
                          - description
                          - target
                          - documentType
                          - country
                          - side
                      - title: Other Document
                        description: >-
                          Response for other documents uploaded for business
                          representatives.
                        type: object
                        properties:
                          id:
                            description: The unique identifier of the document
                            example: documentFile_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
                            type: string
                          targetId:
                            description: >-
                              The unique identifier of the target entity for
                              which the document is being uploaded
                            example: customer_66c4168d418a410eae282b83883bdc39
                            type: string
                          createdAt:
                            description: The date and time the document was created
                            example: '2025-12-31T10:30:00.000Z'
                            type: string
                          fileName:
                            description: The name of the document file
                            example: passport_front_20250101.pdf
                            type: string
                          fileSize:
                            description: The size of the document in bytes
                            example: 2048576
                            type: number
                          mimeType:
                            description: The MIME type of the document file
                            example: application/pdf
                            type: string
                          description:
                            description: The description of the document
                            example: Passport photo page
                            type: string
                          target:
                            description: >-
                              The target entity for which the document is being
                              uploaded
                            example: business_representative
                            type: string
                            enum:
                              - business_representative
                          documentType:
                            description: The type of the document
                            example: proof_of_address_document
                            type: string
                            enum:
                              - passport
                              - drivers
                              - id_card
                              - residence_permit
                              - proof_of_address_document
                              - liveness_report_document
                              - w9_document
                              - w8_ben_document
                              - source_of_funds_document
                        required:
                          - id
                          - targetId
                          - createdAt
                          - fileName
                          - fileSize
                          - mimeType
                          - description
                          - target
                          - documentType
                  - title: Transfer
                    description: >-
                      Response for a supporting document uploaded for a
                      transfer.
                    example:
                      target: transfer
                      id: document_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
                      originalFilename: invoice_2025.pdf
                      mimeType: application/pdf
                      fileSize: 2048576
                      uploadedAt: '2025-12-31T10:30:00.000Z'
                    type: object
                    properties:
                      target:
                        description: The target entity for which the document was uploaded
                        example: transfer
                        type: string
                        enum:
                          - transfer
                      id:
                        description: The unique identifier of the uploaded document
                        example: document_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
                        type: string
                      originalFilename:
                        description: The original filename of the uploaded document
                        example: invoice_2025.pdf
                        type: string
                      mimeType:
                        description: The MIME type of the document file
                        example: application/pdf
                        type: string
                      fileSize:
                        description: The size of the document in bytes
                        example: 2048576
                        type: number
                      uploadedAt:
                        description: The date and time the document was uploaded
                        example: '2025-12-31T10:30:00.000Z'
                        oneOf:
                          - type: string
                          - {}
                    required:
                      - target
                      - id
                      - originalFilename
                      - mimeType
                      - fileSize
                      - uploadedAt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
              examples:
                Bad Request:
                  summary: Bad Request
                  value:
                    status: 400
                    detail: Invalid request parameters
                    code: address/invalid
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
              examples:
                Not Found:
                  summary: Not Found
                  value:
                    status: 404
                    detail: Resource not found
                    code: resource/not-found
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
        '422':
          description: Unprocessable Entity - Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
              examples:
                Validation Error:
                  summary: Validation Error
                  value:
                    status: 422
                    detail: Validation failed
                    code: validation/failed
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
                    errors:
                      - detail: Invalid email format
                        pointer: /email
                      - detail: Name is required
                        pointer: /name
components:
  schemas:
    ProblemDetailsDto:
      type: object
      properties:
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        code:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              pointer:
                type: string
              parameter:
                type: string
              header:
                type: string
            required:
              - detail
        correlationId:
          type: string
      required:
        - status
        - detail
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````