---
title: "Upload File"
method: POST
path: "/v1/files"
---

# Upload File

`POST /v1/files`

Upload a file to the Spitch server.

Args:
    file: The file to upload from the request
    identity: Authentication identity containing org_id and user_id
    db: Database session
    
Returns:
    FileMetaResponse: Metadata for the uploaded file
    
Raises:
    HTTPException: 500 if upload fails

## Response `200`

Successful Response

- FileMetaResponse — description of a file. Attributes: file_id: unique identifier for the file. status: status of the file, `processing` or `ready` original_name: original name of the file. If the file was uploaded via API
  - `file_id` string, uuid, required
  - `status` 'uploading' | 'ready', required
  - `original_name` string, nullable, required
  - `size_bytes` integer, nullable, required
  - `content_type` string, nullable, required
  - `category` string, nullable, required
  - `created_at` string, date-time, required
  - `uploaded_by` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2025-10-07** `62c455aac36a` — 1 breaking, 2 warning, 2 info
  - the response property `uploaded_by` became optional for the status `200`
  - added the new `ready` enum value to the `status` response property for the response status `200`
  - added the new `uploading` enum value to the `status` response property for the response status `200`
  - the endpoint scheme security `OAuth2PasswordBearer` was added to the API
  - …1 more
- **2025-10-06** `8814c306e6ef` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/spi-tch/apis/spitch-api/changes/v1/files/post.md)

---

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