---
title: "Create multipart upload session"
method: POST
path: "/media/uploads"
---

# Create multipart upload session

`POST /media/uploads`

Create a media record and start an S3 multipart upload session.

## Headers

- `X-Fanvue-API-Version` string, required

## Request body

- object
  - `name` string, required
  - `filename` string, required
  - `mediaType` 'image' | 'video' | 'audio' | 'document', required
  - `sizeBytes` integer — Total size of the file in bytes. When provided, the response includes the exact `totalParts` to upload.

## Response `200`

Upload session created

- object
  - `mediaUuid` string, uuid, required
  - `uploadId` string, required
  - `partSize` integer, required — Size in bytes of every part except the final one (which may be smaller).
  - `maxParts` integer, required — Maximum number of parts allowed, derived from the maximum supported file size.
  - `totalParts` integer, nullable, required — Exact number of parts to upload, computed from `sizeBytes`. Null when `sizeBytes` was not provided — compute it client-side as ceil(fileSize / partSize).

## Other responses

- `400` — Bad Request - API version not supported OR validation failed
- `401` — Unauthorized Response
- `403` — Unauthorized Response
- `410` — API version no longer supported (sunset)
- `429` — Too many requests - rate limit exceeded

---

[API](https://skmtc.net/fanvue/apis/fanvue-api.md) · [All operations](https://skmtc.net/fanvue/apis/fanvue-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fanvue/fanvue-api/revisions/c5ddcd5c7e72/schema)
