---
title: "The posts that use this file"
method: GET
path: "/media/{id}/posts"
tags: ["Media"]
---

# The posts that use this file

`GET /media/{id}/posts`

## Request

- Base URL: `https://preflight.social/v1`
- URL: `https://preflight.social/v1/media/{id}/posts`
- Auth: HTTP bearer

## Response `200`

Posts.

- object
  - `data` Post[]
    - `id` string, uuid
    - `status` 'draft' | 'scheduled' | 'publishing' | 'done' | 'canceled'
    - `content` string
    - `linkUrl` string, nullable
    - `mediaIds` string[]
    - `altTexts` string[]
    - `scheduledAt` string, date-time, nullable
    - `approvalState` string, nullable: pending, approved or changes when a client approval link exists.
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `targets` Target[]
      - `id` string, uuid
      - `platform` 'youtube' | 'tiktok' | 'instagram' | 'facebook' | 'threads' | 'twitter' | 'linkedin' | 'pinterest' | 'bluesky' | 'mastodon' | 'telegram' | 'discord' | 'tumblr': A network's name. twitter (X) is text-only and not offered to new accounts.
      - `accountId` string, uuid
      - `status` 'pending' | 'publishing' | 'published' | 'failed' | 'skipped'
      - `remoteId` string, nullable
      - `remoteUrl` string, uri, nullable
      - `publishedAt` string, date-time, nullable
      - `error` string, nullable
      - `errorCode` string, nullable
      - `errorPermanent` boolean: Retrying cannot succeed without changing something.
      - `attempts` integer
      - `nextAttemptAt` string, date-time, nullable
      - `canEditRemote` boolean
      - `canDeleteRemote` boolean
      - `options` object
      - `metrics` object, nullable: The latest figures, with fetchedAt.

## Other responses

- `401`: Missing, expired or unrecognised key.
- `404`: No such post, file or account in this workspace.

---

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