---
title: "Files, newest first"
method: GET
path: "/media"
tags: ["Media"]
---

# Files, newest first

`GET /media`

## Request

- Base URL: `https://preflight.social/v1`
- URL: `https://preflight.social/v1/media`
- Auth: HTTP bearer

## Query parameters

- `limit` integer

## Response `200`

Files, each with how many posts use it.

- object
  - `data` Media[]
    - `id` string, uuid
    - `kind` 'image' | 'video'
    - `status` 'awaiting_upload' | 'ingesting' | 'processing' | 'ready' | 'failed' | 'deleted'
    - `mimeType` string, nullable
    - `sizeBytes` integer, nullable
    - `durationSeconds` number, nullable
    - `width` integer, nullable
    - `height` integer, nullable
    - `fps` number, nullable
    - `fileName` string, nullable
    - `previewUrl` string, uri, nullable: A short-lived link to the file.
    - `error` string, nullable
    - `createdAt` string, date-time

## Other responses

- `401`: Missing, expired or unrecognised key.

---

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