---
title: "Create upload URL"
method: POST
path: "/v1/media/uploads"
---

# Create upload URL

`POST /v1/media/uploads`

## Request

- Base URL: `https://postonce.to/api/public`
- URL: `https://postonce.to/api/public/v1/media/uploads`
- Auth: HTTP bearer

Creates a signed upload URL and media_id. Upload raw file bytes with PUT to data.upload.signedUrl, then call get_media with that media_id and pass the returned data.public_url as media[].url when creating a post or draft. URL creation alone does not upload bytes. Treat the signed URL as a temporary credential; do not open it in a browser.

## Request body

- object
  - `filename` string, required: Original file name including extension.
  - `content_type` 'image/jpeg' | 'image/png' | 'image/webp' | 'video/mp4' | 'video/quicktime' | 'video/webm', required: MIME type of the file being uploaded.

## Response `201`

Signed upload URL created successfully.

- object
  - `data` object
    - `content_type` 'image/jpeg' | 'image/png' | 'image/webp' | 'video/mp4' | 'video/quicktime' | 'video/webm'
    - `media_id` string
    - `path` string
    - `upload` object
      - `path` string
      - `token` string
      - `signedUrl` string

## Other responses

- `400`: Missing or invalid payload fields.
- `401`: Missing, invalid, revoked, or expired API key.

---

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