---
title: "Upload File"
method: POST
path: "/api/files/upload"
tags: ["files"]
---

# Upload File

`POST /api/files/upload`

## Request

- Base URL: `https://api.regdoor.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.regdoor.com/api/files/upload`
- Auth: HTTP bearer

Upload a file to the general upload folder.
Returns information about the uploaded file including the storage filename, original filename, and content type.

Args:
    file: The file to upload
    use_original_name: If True, uses the original filename, if False generates a UUID

## Query parameters

- `use_original_name` boolean

## Headers

- `X-User-Email` string, nullable
- `X-User-Name` string, nullable

## Request body `multipart/form-data`

- BodyUploadFileApiFilesUploadPost
  - `file` string, binary, required

## Response `200`

Successful Response

- FileUploadResponse: Response model for file upload endpoint
  - `storage_filename` string, required
  - `original_filename` string, required
  - `content_type` string, required

## Other responses

- `404`: Not found
- `422`: Validation Error

---

[API](https://skmtc.dev/regdoor/apis/regdoor-api.md) - [All operations](https://skmtc.dev/regdoor/apis/regdoor-api/llms.txt) - [OpenAPI document](https://skmtc.dev/regdoor/apis/regdoor-api/revisions/7642336631af?raw)
