---
title: "Get a presigned URL to upload media, then PUT the file to it"
method: POST
path: "/media/upload-url"
tags: ["Media"]
---

# Get a presigned URL to upload media, then PUT the file to it

`POST /media/upload-url`

## Request

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

Required for TikTok photos (must be served from cdn.posteahora.com). Works for any size.

## Request body

- object
  - `filename` string
  - `contentType` string
  - `sizeBytes` integer
  - `prefix` string

## Response `201`

Created

- object
  - `uploadUrl` string, uri
  - `publicUrl` string, uri

---

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