---
title: "Upload file"
method: POST
path: "/api/storage/upload"
tags: ["storage"]
---

# Upload file

`POST /api/storage/upload`

Upload a file to storage. Admins can upload to any user's path. Otherwise the path must belong to the current user.

## Query parameters

- `file_path` string, required — Full path where to save the file (e.g., users/{user_id}/files/documents/consent.pdf)
- `replace_existing` boolean — If true, replace existing file

## Response `201`

Successful Response

- UploadFileResponse — File upload response model.
  - `file_path` string, required — Path to uploaded file in storage
  - `title` string, nullable — Success title
  - `message` string — Success message

## Other responses

- `422` — Validation Error

---

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