---
title: "Upload media (multipart)"
method: POST
path: "/v1/media"
tags: ["Media"]
---

# Upload media (multipart)

`POST /v1/media`

## Request

- Base URL: `https://api.letmepost.dev`
- URL: `https://api.letmepost.dev/v1/media`
- Auth: HTTP bearer

Stream a single `file` part to S3 and get back a `med_…` id to reference from post bodies as `media: [{ kind, mediaId }]`.

The per-file ceiling is 200 MB. Optional `?profileId=` lands the media inside that profile (org-wide keys only — profile-scoped keys are pinned to their profile).

## Query parameters

- `profileId` string, uuid

## Response `201`

Upload succeeded.

- CreateMediaResponse
  - `id` string, required
  - `url` string, uri, required
  - `contentType` string, required
  - `sizeBytes` integer, required
  - `sha256` string, required
  - `createdAt` string, date-time, required

## Other responses

- `400`: `validation_failed` — request body or query parameters didn't match the schema. Rules surfaced include `body.json`, `targets.required`, `targets.max`, `mode_conflict`, `targets.options.platform_mismatch`, `targets.account.platform_mismatch`, `target.account.not_connected`, `target.account.ambiguous`, `scheduledAt.future`, `scheduledAt.no_first_comment`, `scheduledAt.no_bluesky_reply`.
- `401`: `unauthenticated` — missing or invalid Bearer key.
- `404`: `not_found` — the resource does not exist in the caller's organization (or, for profile-scoped keys, in the caller's profile).
- `413`: `validation_failed` with `rule: media.size_max` — upload exceeded the 200 MB per-file ceiling.
- `429`: `rate_limited` — too many requests. Inspect `X-RateLimit-Limit` (static ceiling) and the IETF-draft `RateLimit-*` headers (sliding-window remaining/reset) before retrying.
- `500`: `internal_error` — something on our end failed unexpectedly. Quote the `requestId` when reporting.

---

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