---
title: "Upload file (server-side to R2)"
method: POST
path: "/uploads"
tags: ["uploads"]
---

# Upload file (server-side to R2)

`POST /uploads`

## Request

- Base URL: `https://api.confbuilder.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.confbuilder.com/uploads`
- Auth: none declared

Accepts a multipart file upload, optimizes images to WebP, and stores the
result in the configured R2 bucket under a unique timestamped key.

On replace, pass `previous_url` (the currently-stored /uploads/proxy/... URL
for this slot/file) and the backend best-effort deletes that object after
the new one is stored, so old versions don't accumulate.

Returns `public_url` -> /uploads/proxy/{key} (the proxy route), plus `key`.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/confbuilder/apis/confbuilder-api.md) · [All operations](https://skmtc.dev/confbuilder/apis/confbuilder-api/llms.txt) · [OpenAPI document](https://skmtc.dev/confbuilder/apis/confbuilder-api/revisions/9e576d664e16?raw)
