---
title: "Initialize media upload"
method: POST
path: "/object/media/upload"
tags: ["Object"]
---

# Initialize media upload

`POST /object/media/upload`

## Request

- Base URL: `https://api.capacities.io`
- URL: `https://api.capacities.io/object/media/upload`
- Auth: HTTP bearer

Starts a pending single-file media upload. The API infers the media object type from `fileType` and `fileName`.

<br>

**Rate limit**: 20 requests per 60 seconds

## Request body

- object
  - `fileName` string, required: Original file name, including extension when available.
  - `fileSize` integer, required: File size in bytes.
  - `fileType` string: MIME type, e.g. `image/png`.
  - `title` string: Optional object title. Defaults to file name.
  - `collections` string[]: Collection ids to assign. Pass an empty array to use the default collection for this structure.

## Response `200`

200 OK

- object
  - `id` string, uuid, required: Reserved object id that will be used when the upload completes.
  - `status` 'pending', required
  - `fileName` string, required
  - `fileType` string, required
  - `fileSize` integer, required
  - `partSize` integer, required: Required part size in bytes, except for the final part.
  - `partCount` integer, required
  - `expiresAt` string, date-time, required: ISO 8601 datetime when this pending upload session expires.

## Changes

- **2026-11-10** `6f0bb3feba3c`: 1 info
  - the `expiresAt` response's property pattern was changed from `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$` to `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` for the status `200`
- **2026-09-08** `fbf7beb5767f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/capacities/apis/capacities-api-beta/changes/object/media/upload/post.md)

---

[API](https://skmtc.dev/capacities/apis/capacities-api-beta.md) - [All operations](https://skmtc.dev/capacities/apis/capacities-api-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/capacities/apis/capacities-api-beta/revisions/8a6ece33d9bf?raw)
