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

# Upload a file

> `multipart/form-data` with a `file` part and a `purpose` text field. The purpose fixes the size and type limits. Purposes and limits: `dispute.evidence` (10MB; image/jpeg, image/png, image/webp, application/pdf); `identity.document` (5MB; image/jpeg, image/png, application/pdf); `identity.selfie` (5MB; image/jpeg, image/png); `business.logo` (2MB; image/jpeg, image/png, image/svg+xml, image/webp); `business.document` (10MB; image/jpeg, image/png, application/pdf). Reference the returned id elsewhere, e.g. as `fileIds` when contesting a dispute.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/files
openapi: 3.1.0
info:
  title: Chipper Platform API
  version: '2026-02-20'
  description: >-
    Payouts, collections, and FX across African rails — bank, mobile money, and
    stablecoins — through one API.
servers:
  - url: https://sandbox-api.platform.chipper.ai
    description: Sandbox (sk_test_ keys — simulated rails, no real money)
  - url: https://api.platform.chipper.ai
    description: Production (sk_live_ keys)
security:
  - bearerAuth: []
paths:
  /v1/files:
    post:
      tags:
        - Files
      summary: Upload a file
      description: >-
        `multipart/form-data` with a `file` part and a `purpose` text field. The
        purpose fixes the size and type limits. Purposes and limits:
        `dispute.evidence` (10MB; image/jpeg, image/png, image/webp,
        application/pdf); `identity.document` (5MB; image/jpeg, image/png,
        application/pdf); `identity.selfie` (5MB; image/jpeg, image/png);
        `business.logo` (2MB; image/jpeg, image/png, image/svg+xml, image/webp);
        `business.document` (10MB; image/jpeg, image/png, application/pdf).
        Reference the returned id elsewhere, e.g. as `fileIds` when contesting a
        dispute.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                purpose:
                  type: string
                  enum:
                    - dispute.evidence
                    - identity.document
                    - identity.selfie
                    - business.logo
                    - business.document
                file:
                  type: string
                  description: The file contents.
                  format: binary
              required:
                - purpose
                - file
      responses:
        '201':
          description: The stored file with a signed download URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  file:
                    $ref: '#/components/schemas/File'
                required:
                  - file
        '400':
          description: >-
            Missing file/purpose, unknown purpose, too large, or content type
            not allowed for the purpose.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: bad_request
                message: >-
                  Content type text/plain not allowed for purpose
                  dispute.evidence
                requestId: req_q7vei435zifs51ia0lqr
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: unauthorized
                message: Invalid API key
                requestId: req_q7vei435zifs51ia0lqr
        '403':
          description: The API key lacks the required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: forbidden
                message: API key does not have the required scope
                requestId: req_q7vei435zifs51ia0lqr
      security:
        - bearerAuth: []
components:
  schemas:
    File:
      type: object
      properties:
        id:
          type: string
          example: file_q7vei435zifs51ia0lqr
        purpose:
          type: string
          example: dispute.evidence
        filename:
          type: string
          example: delivery-receipt.pdf
        contentType:
          type: string
          example: application/pdf
        size:
          type: integer
          description: Bytes.
          example: 48213
        url:
          type: string
          format: uri
          description: >-
            Short-lived signed download URL (15 min to 24 h depending on
            purpose). Present on upload and get, omitted in lists.
        createdAt:
          type: string
          format: date-time
          example: '2026-08-01T09:12:44.000Z'
      required:
        - id
        - purpose
        - filename
        - contentType
        - size
        - createdAt
    Error:
      type: object
      properties:
        error:
          type: string
          description: Stable machine-readable code.
        message:
          type: string
          description: Human-readable explanation.
        requestId:
          type: string
          description: Echoed in the x-request-id response header — quote it to support.
      required:
        - error
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `sk_test_…` (sandbox) or `sk_live_…` (production).'

````