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

# Upload a document

> Upload one file: the invoice for a USD payout to a third-party USD beneficiary. Send it as `multipart/form-data` in the field `file`. The file must be a PDF, JPEG or PNG, at most 5 MB. Name the `id` in `POST /v2/payouts` as `invoice_document_id`. Requires an `Idempotency-Key`.



## OpenAPI

````yaml /v2/openapi.json post /documents
openapi: 3.1.0
info:
  title: Jenzy Hermes Multi-asset API
  version: 2.0.0
  description: >-
    Hold and pay out across the assets enabled for your organization. Every
    amount is an exact decimal string beside an `asset` field. Authenticate with
    the same `jz_live_…` API key as `/v1`.
servers:
  - url: https://api.jenzy.com/v2
    description: Production
security: []
paths:
  /documents:
    post:
      summary: Upload a document
      description: >-
        Upload one file: the invoice for a USD payout to a third-party USD
        beneficiary. Send it as `multipart/form-data` in the field `file`. The
        file must be a PDF, JPEG or PNG, at most 5 MB. Name the `id` in `POST
        /v2/payouts` as `invoice_document_id`. Requires an `Idempotency-Key`.
      parameters:
        - schema:
            type: string
            description: Required. A key you mint per upload.
          required: true
          description: Required. A key you mint per upload.
          name: Idempotency-Key
          in: header
        - $ref: '#/components/parameters/HermesOrg'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
                - file
      responses:
        '201':
          description: Stored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '400':
          description: No `file` field, or no `Idempotency-Key`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: >-
            `corridor_not_enabled`: USD payouts are not enabled for your
            organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: This `Idempotency-Key` was already used with a different file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '413':
          description: '`payload_too_large`: the file is over 5 MB.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '415':
          description: >-
            `unsupported_media_type`: the bytes are not a PDF, JPEG or PNG, or
            disagree with the declared type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    HermesOrg:
      name: HERMES-ORG
      in: header
      required: false
      description: >-
        The id of one of your Child orgs. The call then acts on that Child org,
        not on your organization. If you do not send it, the call acts on your
        organization. An id that is not one of your Child orgs gives `404`.
      schema:
        type: string
        format: uuid
        example: 3f1c2a9e-8b7d-4e21-9a6f-0c5d4b3e2a10
  schemas:
    Document:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Name it in a USD payout’s `invoice_document_id`. One document
            justifies one payout.
        file_name:
          type: string
          example: invoice-0042.pdf
        content_type:
          type: string
          enum:
            - application/pdf
            - image/jpeg
            - image/png
        size_bytes:
          type: integer
          example: 48213
        created_at:
          type: string
          format: date-time
      required:
        - id
        - file_name
        - content_type
        - size_bytes
        - created_at
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - validation_error
                - unauthorized
                - forbidden
                - not_found
                - conflict
                - rate_limited
                - internal_error
                - unknown_institution
                - invalid_mobile_number
                - invalid_account_number
                - mobile_number_institution_mismatch
                - service_unavailable
                - sandbox_only
                - insufficient_funds
                - rail_disabled
                - amount_limit_exceeded
                - org_limit_exceeded
                - service_incident
                - service_maintenance
                - onboarding_incomplete
                - access_suspended
                - corridor_not_enabled
                - unsupported_pair
                - invalid_wallet_address
                - rate_unavailable
                - quote_expired
                - quote_used
                - limit_exceeded
                - amount_below_minimum
                - unsupported_asset
                - unsupported_network
                - unsupported_media_type
                - payload_too_large
                - client_ref_used
                - beneficiary_required
                - beneficiary_not_allowed
                - proof_not_expected
                - invalid_beneficiary
                - beneficiary_exists
                - beneficiary_not_active
                - invoice_required
                - prohibited_industry
              description: >-
                Stable identifier a client may branch on — never renamed or
                removed.
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Your Jenzy API key: `Authorization: Bearer jz_live_…`'

````

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