---
title: "Prepare direct media uploads"
method: POST
path: "/api/v1/media/uploads"
tags: ["Posts"]
---

# Prepare direct media uploads

`POST /api/v1/media/uploads`

## Request

- Base URL: `https://app.tryadeli.com`
- URL: `https://app.tryadeli.com/api/v1/media/uploads`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/adeli/apis/adeli-api/docs/api/v1/media/uploads/post.ts> (a function with typed inputs; its response is checked against the schema)

Create short-lived, object-scoped S3 PUT descriptors. Upload each file with the returned headers unchanged, then pass its uploadId as upload_id when publishing. Name one `platform`, or several `platforms` to upload a file once and use it in a publication to all of them; each file must fit every listed platform's limits.

## Request body

- object
  - `profileId` string, uuid, required
  - `platform` 'instagram' | 'facebook' | 'tiktok' | 'youtube' | 'x' | 'bluesky' | 'linkedin'
  - `platforms` string[]
  - `files` object[], required
    - `clientId` string, required
    - `purpose` 'post_media' | 'youtube_thumbnail', required
    - `contentType` string, required
    - `size` integer, required
    - `filename` string

## Response `201`

Success

- object
  - `uploads` object[], required
    - `clientId` string, required
    - `uploadId` string, required
    - `method` 'PUT', required
    - `url` string, uri, required
    - `headers` object, required
    - `expiresAt` string, date-time, required

## Other responses

- `400`: Invalid request or provider failure
- `401`: Missing or invalid API key
- `502`: Invalid request or provider failure

---

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