Media library

Browse a social set's media library via the Pallyy API, filter by folder, type, or name, and reference items when creating posts.

Each social set has its own media library holding the images and videos you post. Posts created via the API reference library items by id, so browsing the library is how you find the mediaLibraryId values that post sets need.

The library is read-only over the API. To add files, use media uploads.

List media

GET /v1/media
ParameterRequiredMeaning
socialSetIdYesThe social set whose library to list
page, sizeNoSee pagination
filters[folderId]NoOnly items in this folder
filters[type]Noimage or video
filters[name]NoName search
filters[withScheduledPosts]Notrue or false, whether the item is used by scheduled posts
sort[name], sort[timestamp]NoASC or DESC
curl "https://app.pallyy.com/api/v1/media?socialSetId=SET_ID&filters[type]=image&sort[timestamp]=DESC" \
  -H "Authorization: Bearer pallyy_your_api_key"

Get a media item

GET /v1/media/{id}

Returns a single item, or a 404 if it does not exist or is outside the key's access.

The media object

{
  "id": "665f1c2ab7e2a4d1f0a1b2c5",
  "socialSetId": "665f1c2ab7e2a4d1f0a1b2c3",
  "type": "image",
  "name": "latte.jpg",
  "fileName": "latte.jpg",
  "mimeType": "image/jpeg",
  "size": 245133,
  "width": 1080,
  "height": 1350,
  "url": "https://...",
  "thumbnailUrl": "https://...",
  "usage": { "scheduledPosts": 2 },
  "timestamp": "2026-08-01T10:00:00.000Z"
}
FieldTypeMeaning
idstringThe media id, used as mediaLibraryId in post sets
socialSetIdstringThe social set the item belongs to
typestringimage or video
name, fileNamestringDisplay name and original file name
mimeTypestringThe file's MIME type
sizenumberFile size in bytes
width, heightnumberDimensions in pixels
durationnumberVideo duration in seconds, videos only
videoBitrate, audioBitratenumberBitrates, videos only
folderIdstringThe library folder, if the item is in one
captionstringA saved caption, if set in Pallyy
url, thumbnailUrlstringURLs to the file and its thumbnail
usage.scheduledPostsnumberHow many scheduled posts use this item
timestampstringISO 8601 time the item was added
View as markdown

More in Endpoints

Questions about the API? Email us at hey@pallyy.com and we'll get back to you.