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

# Upload a file

`POST /files`

Accepts multipart/form-data with fields:
- file: binary (required)
- file_metadata: string (optional, JSON string)

## Response `200`

File uploaded successfully

- FileResponse — Metadata describing an uploaded file in Chunkr. Returned by POST `/files` and GET `/files/{file_id}`.
  - `content_type` string, required — MIME type detected or provided for the file.
  - `created_at` string, date-time, required — Timestamp when the file was created.
  - `file_id` string, required — Unique identifier for the file.
  - `file_name` string, required — The original filename supplied by the client.
  - `file_size` integer, required — Size of the stored file in bytes.
  - `metadata` object, required — Arbitrary JSON metadata associated with the file.
  - `url` string, required — Permanent Chunkr URL. Use directly with other chunkr API requests.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `500` — Server error

---

[API](https://skmtc.dev/chunkr/apis/chunkr-api.md) · [All operations](https://skmtc.dev/chunkr/apis/chunkr-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chunkr/chunkr-api/revisions/cfcf1ff1cbb0/schema)
