---
title: "List media attachments for a workspace"
method: GET
path: "/media"
tags: ["Media"]
---

# List media attachments for a workspace

`GET /media`

## Request

- Base URL: `https://app.openpo.st/api/v1`
- URL: `https://app.openpo.st/api/v1/media`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `openpost_session`

## Query parameters

- `workspace_id` string, required: Filter by workspace ID
- `filter` string: Filter: all, used, unused, favorites
- `sort` string: Sort: newest, oldest, name, size, recently_used
- `search` string: Search filename, alt text, and tag
- `type` string: Filter by dominant media type
- `source` string: Filter by media provenance
- `asset_kind` string: Filter by asset role; defaults to library
- `lifecycle` 'library' | 'temporary' | 'trash' | 'all': Lifecycle view; defaults to library
- `aspect` string: Filter: square, portrait, landscape
- `tag_id` string: Filter by one tag ID
- `tag_ids` string: Comma-separated tag IDs; media must have every selected tag
- `untagged` boolean: Only media that has no tags
- `min_width` integer
- `min_height` integer
- `max_width` integer
- `max_height` integer
- `date_from` string: Created on or after this YYYY-MM-DD date
- `date_to` string: Created on or before this YYYY-MM-DD date
- `limit` integer: Limit (default 50, max 200)
- `offset` integer: Offset for pagination

## Response `200`

OK

- ListMediaOutputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `media` MediaListItem[], nullable, required: Media attachments
    - `alt_text` string, required: Alt text
    - `analysis_error` string: Media analysis error
    - `analysis_status` string, required: Media analysis status
    - `asset_kind` string, required: Media library role
    - `audio_channels` integer, required: Detected audio channel count
    - `audio_codec` string: Detected audio codec
    - `bit_rate` integer, required: Detected aggregate bitrate in bits per second
    - `can_delete` boolean, required: Whether media can be deleted
    - `color_space` string: Detected video color space
    - `container_format` string: Detected media container
    - `created_at` string, required: Creation time
    - `design_document_id` string: Producing OpenPost Image Editor design
    - `design_page_id` string: Producing OpenPost Image Editor page
    - `duration_ms` integer, required: Video duration in milliseconds
    - `frame_rate` number, double, required: Video frame rate
    - `height` integer, required: Image height
    - `id` string, required: Media ID
    - `is_favorite` boolean, required: Whether media is favorited
    - `last_used_at` string: Most recent known reference time
    - `mime_type` string, required: MIME type
    - `original_filename` string, required: Original filename
    - `parent_media_id` string: Source media for this derivative
    - `pixel_format` string: Detected video pixel format
    - `poster_thumbnail_url` string: Poster thumbnail URL
    - `processing_progress` integer, required: Server processing progress from 0 to 100
    - `processing_status` string, required: Processing status
    - `public_url_checked_at` string: Public URL verification time
    - `public_url_error` string: Public URL verification error
    - `public_url_status` integer, required: Public URL verification HTTP status
    - `purge_after` string: Time the item becomes eligible for permanent deletion
    - `retention_class` 'library' | 'temporary', required: Whether the asset is kept in the library or managed as temporary post media
    - `rotation` integer, required: Normalized display rotation
    - `size` integer, required: File size in bytes
    - `source` string, required: Media provenance
    - `tags` string[], nullable, required: Tag IDs assigned to this media
    - `thumbnail_url` string, required: Thumbnail URL for grid view
    - `trash_reason` 'manual' | 'published' | 'expired': Why the item entered Trash
    - `trashed_at` string: Time the item entered Trash
    - `url` string, required: URL to access the media
    - `usage_count` integer, required: Number of publications and reusable assets using this media
    - `video_codec` string: Detected video codec
    - `video_profile` string: Detected video codec profile
    - `width` integer, required: Image width
    - `workspace_id` string, required: Workspace ID
  - `total` integer, required: Total count matching filter

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/openpo/apis/openpost-api.md) · [All operations](https://skmtc.dev/openpo/apis/openpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openpo/apis/openpost-api/revisions/67d3964458a7?raw)
