Postpone Logo
Queries

Content Library

Query and filter media files from your Postpone Content Library.

The media query retrieves files from your Content Library with support for filtering, searching, and pagination.

MediaType

id
ID!
Unique identifier for the media file.
name
String
The filename as stored in your Content Library.
url
String
Direct URL to the media file.
thumbnailUrl
String
URL to a thumbnail preview of the media.
mimeType
String
The MIME type of the file (e.g. image/jpeg, video/mp4).
size
BigInt
File size in bytes.
humanReadableSize
String
Human-readable file size (e.g. 2.4 MB).
isImage
Boolean
Whether this file is an image.
isVideo
Boolean
Whether this file is a video.
isGif
Boolean
Whether this file is a GIF.
altText
String
Accessibility alt text for the media.
dateCreated
DateTime
When the file was added to the Content Library.
dateUpdated
DateTime
When the file was last updated.
labels
[MediaLabelType]
Labels assigned to this media file. See MediaLabelType below.

MediaLabelType

id
ID!
Unique identifier for the label.
text
String
The label text.
color
String
The label color as a hex string (e.g. #FF5733).

media Query

Returns a paginated list of media from your Content Library.

orderBy
String
Sort order. Prefix with - for descending. Supported values: id, name, size, mimeType, dateCreated. Default: -id.
page
Int
Page number for pagination. Default: 1.
limit
Int
Number of results per page. Maximum: 100. Default: 25.
search
String
Filter by filename (case-insensitive substring match).
fileType
FileType
Filter by file type. Values: IMAGE, VIDEO, GIF.
usageFilter
MediaUsageFilterInput
Filter by how media has been used across platforms. See MediaUsageFilterInput below.

MediaUsageFilterInput

filterType
MediaUsageFilterType! required
The type of usage filter to apply.
  • UNUSED — Media that has not been scheduled or submitted
  • UNSCHEDULED — Media not currently scheduled for any future post
  • UNSUBMITTED — Media that has never been submitted to a post
platforms
[String]
Limit the filter to specific platforms (e.g. ["REDDIT", "TWITTER"]). Defaults to all connected platforms if omitted.
subreddits
[String]
Filter by specific Reddit subreddits. Only valid when REDDIT is included in platforms.

List Media

query media(
  $orderBy: String
  $limit: Int
  $page: Int
  $search: String
  $fileType: FileType
) {
  media(
    orderBy: $orderBy
    limit: $limit
    page: $page
    search: $search
    fileType: $fileType
  ) {
    total
    objects {
      id
      name
      mimeType
      size
      humanReadableSize
      url
      thumbnailUrl
      dateCreated
      labels {
        id
        text
        color
      }
    }
  }
}

Filter by Usage

Filter media based on whether it has been scheduled or submitted across platforms.

query media(
  $limit: Int
  $page: Int
  $orderBy: String
  $usageFilter: MediaUsageFilterInput
) {
  media(
    limit: $limit
    page: $page
    orderBy: $orderBy
    usageFilter: $usageFilter
  ) {
    total
    objects {
      id
      name
      url
      thumbnailUrl
      dateCreated
    }
  }
}