---
title: "Upload media"
method: POST
path: "/media/upload"
tags: ["Media"]
---

# Upload media

`POST /media/upload`

## Request

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

Upload a media file (image, video, or PDF). The file is stored and can be referenced when creating posts.

**Allowed types:** JPEG, PNG, GIF, WebP, MP4, MOV, PDF

**Max file size:** 100 MB

## Response `201`

File uploaded successfully

- object
  - `ok` boolean
  - `data` MediaUpload
    - `id` string, uuid
    - `name` string: Original filename
    - `url` string: Public URL of the uploaded file
    - `type` string: MIME type
    - `size` number: File size in bytes
    - `createdAt` string, date-time
    - `source` 'upload' | 'library': Where the media lives: `upload` (added via the API) or `library` (the workspace's dashboard media library). Present on `GET /media` results.

## Other responses

- `400`: Missing file or invalid file type

---

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