---
title: "Create a presigned media upload url"
method: POST
path: "/v1/posts/media/upload-url"
tags: ["Posts"]
---

# Create a presigned media upload url

`POST /v1/posts/media/upload-url`

## Request

- Base URL: `https://api.taplio.com`
- URL: `https://api.taplio.com/v1/posts/media/upload-url`
- Auth: HTTP bearer

Returns a one-time presigned upload url, a `media_id`, and the headers to send with it. PUT the raw bytes to the url, then attach the `media_id` with `media_ids` on `POST /v1/posts/drafts` or `PATCH /v1/posts/drafts/{id}`.

## Request body

- CreateMediaUploadUrlBody
  - `content_type` string, required
  - `filename` string

## Response `200`

Presigned upload url and media id.

- CreateMediaUploadUrlResponse
  - `expires_in` number, required
  - `headers` object, required
  - `media_id` string, required
  - `public_url` string, required
  - `upload_url` string, required

## Other responses

- `400`: Validation failed.
- `401`: Missing or invalid API key.
- `402`: Subscription payment failed.
- `403`: Subscription does not allow this request.
- `404`: Resource not found.
- `409`: Resource state precludes this request.
- `422`: Request semantically rejected.
- `429`: Rate limit exceeded.
- `500`: Internal server error.
- `503`: Upstream unavailable.

---

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