---
title: "List media"
method: GET
path: "/media"
tags: ["Media"]
---

# List media

`GET /media`

## Request

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

Returns media you can attach to posts. **To list a workspace's media library
(the files uploaded from the PostPlanify dashboard, which is usually what "my
media" means), you must pass `workspaceId`.** Without it, only files uploaded
through the API are returned (usually a small or empty subset). Each item has a
`source` of `"upload"` or `"library"`; both can be used as `mediaIds` in
`POST /posts`.

## Query parameters

- `workspaceId` string, uuid
- `type` 'image' | 'video'
- `page` integer
- `pageSize` integer

## Response `200`

List of media

- 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.

---

[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)
