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

# Upload a document

> Optional. Puts one document on file, sent as `multipart/form-data`; it shows on the merchant's detail in your Sales Partner dashboard. Another upload of the same type becomes the current one; the earlier stays on file.



## OpenAPI

````yaml sales-partner/api-reference/openapi.json POST /v1/account/{id}/document
openapi: 3.1.0
info:
  title: Compago Sales Partner API
  version: 1.0.0
  description: >-
    API endpoints for Compago sales partners: payments across the organizations
    you manage, your merchant accounts and their onboarding.
servers:
  - url: https://demo-api-honor.compago.com/api/developer
    description: Demo
  - url: https://api-honor.compago.com/api/developer
    description: Production
security: []
tags:
  - name: Payment
    description: Endpoints for querying payment data across your organizations
  - name: PartnerAccounts
    description: Your merchants and their onboarding requirements
  - name: Onboarding
    description: Hosted onboarding links
paths:
  /v1/account/{id}/document:
    post:
      tags:
        - PartnerAccounts
      summary: Upload a document
      description: >-
        Optional. Puts one document on file, sent as `multipart/form-data`; it
        shows on the merchant's detail in your Sales Partner dashboard. Another
        upload of the same type becomes the current one; the earlier stays on
        file.
      operationId: uploadPartnerAccountDocument
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The merchant's id.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                type:
                  $ref: '#/components/schemas/AccountDocumentType'
                file:
                  type: string
                  format: binary
                  description: PDF, JPEG or PNG, up to 10 MB.
              required:
                - type
                - file
      responses:
        '201':
          description: Uploaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountDocument'
        '400':
          description: '`INVALID_DOCUMENT_TYPE` or `FILE_REQUIRED`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '401':
          description: Unauthorized. The `x-api-key` header is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '404':
          description: Not found, or the merchant belongs to another partner.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '413':
          description: '`FILE_TOO_LARGE`: over 10 MB, or empty.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '415':
          description: '`UNSUPPORTED_FILE_TYPE`: only PDF, JPEG and PNG.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '429':
          description: >-
            Rate limit exceeded. See the `Retry-After` and `X-RateLimit-*`
            headers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AccountDocumentType:
      type: string
      enum:
        - IDENTIFICATION_FRONT
        - IDENTIFICATION_BACK
        - PROOF_OF_ADDRESS
        - TAX_CERTIFICATE
        - BANK_STATEMENT
      description: >-
        INE or passport (front, back), comprobante de domicilio, constancia de
        situación fiscal, estado de cuenta.
    AccountDocument:
      type: object
      properties:
        id:
          type: string
          description: Document id.
          format: uuid
        type:
          $ref: '#/components/schemas/AccountDocumentType'
        fileName:
          type: string
          description: The file name it was sent with.
        contentType:
          type: string
          description: '`application/pdf`, `image/jpeg` or `image/png`.'
        size:
          type: integer
          description: Bytes.
        createdAt:
          type: string
          description: When it was uploaded.
          format: date-time
      required:
        - id
        - type
        - fileName
        - contentType
        - size
        - createdAt
    PublicError:
      type: object
      properties:
        message:
          type: string
          description: Human-readable description.
        code:
          type: string
          description: Stable machine-readable code. Branch on this, not on `message`.
      required:
        - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.