---
title: "Upload file"
method: POST
path: "/files"
tags: ["Disputes"]
---

# Upload file

`POST /files`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/files`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `string` scopes: `disputes`, `disputes:provide-evidence`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/checkout/apis/checkout-com-api-reference/docs/files/post.ts> (a function with typed inputs; its response is checked against the schema)

Upload a file to use as evidence in a dispute. Your file must be in either JPEG/JPG, PNG or PDF format, and be no larger than 4MB.

## Request body `multipart/form-data`

- File
  - `file` string, required: The path of the file to upload, and its type. <br><i>This must be a local path.</i>
  - `purpose` string, required: The purpose of the file upload. If the file is a supporting document for a dispute, set this to `dispute_evidence`. If the file is a supporting document for arbitration, set this to `arbitration_evidence`.

## Response `201`

File uploaded successfully

- FileUploadResponse: File uploaded successfully
  - `id` string: The file identifier
  - `_links` object
    - `self` object: The file information retrieval URL
      - `href` string

## Other responses

- `401`: Unauthorized
- `422`: Unprocessable
- `429`: Too many requests

---

[API](https://skmtc.dev/checkout/apis/checkout-com-api-reference.md) - [All operations](https://skmtc.dev/checkout/apis/checkout-com-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/checkout/apis/checkout-com-api-reference/revisions/0f1abdb1c3e9?raw)
