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

# Upload file evidence

> Upload a PDF, PNG, or JPG file as dispute evidence to support your case. File size limit is 10MB.



## OpenAPI

````yaml post /files/upload
openapi: 3.1.0
info:
  title: DisputeNinja API
  description: API for managing dispute evidence and file uploads
  version: 1.0.0
servers:
  - url: https://app.disputeninja.io/api/v1
security: []
paths:
  /files/upload:
    post:
      summary: Upload file evidence
      description: >-
        Upload a PDF, PNG, or JPG file as dispute evidence to support your case.
        File size limit is 10MB.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    The evidence file to upload. Must be in PDF, PNG, or JPG
                    format. Maximum file size is 5MB.
                stripe_dispute_id:
                  type: string
                  description: >-
                    The Stripe dispute ID to which the evidence data will be
                    attached
              required:
                - file
                - stripe_dispute_id
      responses:
        '200':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUploadResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    FileUploadResponse:
      type: object
      properties:
        message:
          type: string
          description: A message indicating the success of the file upload
        dispute_id:
          type: string
          description: The ID of the dispute associated with the uploaded file
        stripe_dispute_id:
          type: string
          description: The Stripe dispute ID associated with the uploaded file
        file:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the uploaded file
            url:
              type: string
              description: The URL where the uploaded file can be accessed
            name:
              type: string
              description: The original name of the uploaded file
          description: Details of the uploaded file
    Error:
      type: object
      properties:
        type:
          type: string
          enum:
            - api_error
            - card_error
            - idempotency_error
            - invalid_request_error
          description: Error type
        code:
          type: string
          description: Short error code for programmatic handling
        message:
          type: string
          description: Human-readable error description
        param:
          type: string
          description: Parameter causing the error, if applicable
      required:
        - type
        - message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````