Skip to main content
The media library is your workspace’s central store of images and videos. Anything you want to attach to a post (feed photo, Reel, YouTube video, carousel image) lives here first. Media files are scoped to the workspace, so any team member (and any post in that workspace) can use them. They are stored on a CDN and served via the link field on each media object. The media library endpoints are available on the Pro and Business plans. On a workspace whose owner is on Free they return 402.

Anatomy of a media item

Uploading

POST /workspaces/{workspace}/media_contents is the one way to add media. Give it a URL or a file:
  • A URL: a JSON body with url (plus optional name, label, folder_id). Images of up to 50 MB come back ready: 201 with the item active. Videos, and files larger than 50 MB, come back processing with 202: poll GET /media_contents/{mediaContent} until the item is active or failed. A URL that announces more than 2 GB is refused with 413.
  • Files: a multipart/form-data body with 1 to 10 files in files[] (plus optional label and folder_id), up to 200 MB each. Every file is stored during the request: 201 with each item active. A larger file is refused with 413.
The type of every file is read from its bytes: JPEG, PNG, GIF, WebP, MP4, and QuickTime are accepted. For a file over the 200 MB request-body limit (up to 2 GB), upload it directly to storage in three steps instead. The file bytes never pass through the API:
  1. Presign: POST /workspaces/{workspace}/media_contents/presign with each file’s name, mime, and size. You get back a pre-signed upload_url (and a temporary media id) for each file, up to 10 per request.
  2. Upload: PUT each file’s bytes straight to its upload_url, replaying the returned upload_headers.
  3. Confirm: POST /workspaces/{workspace}/media_contents/confirm with the IDs from step 1 as media_ids. The API verifies each object, moves it into the library, and returns the finalized media objects. Confirming is all or nothing: if any file hasn’t been uploaded, nothing is confirmed and the response is a 422 naming those IDs.
See Upload and manage media for both bodies with examples, polling, errors, size limits, and bulk-upload patterns.

Media status

Every media response carries status, and error_message when an import failed: A post that references a processing or failed item gets a 422 that names the item and tells you to poll it or to import it again.

Folders

Folders are an organisational layer on top of the library, purely for your team, and never visible to the social network. A folder has an id, a name, a parent_id (so folders nest; null at the top level), and an is_system flag. System folders are created by PublishBuddy and cannot be renamed or deleted; trying either returns 422. Files with no folder live at the root of the library.

Filtering and listing

GET /workspaces/{workspace}/media_contents supports:
  • folder_id: a folder UUID to list one folder, or root for files that are not in any folder. Omit it to list everything.
  • status: active (the default), processing, failed, or temporary. Without it the list hides URL imports still downloading, imports that failed, and presigned uploads not confirmed yet.
  • page / per_page: pagination, default 20 per page. See Pagination.

Relabeling or moving a file

PUT /media_contents/{mediaContent} updates editable metadata: label and folder_id (set folder_id to null to move the file back to the root). The underlying binary is immutable. To replace a file, upload a new one and update any posts that reference the old ID.

Deletion

DELETE /media_contents/{mediaContent} is a soft delete. The file is removed from listings and can no longer be attached to new posts, but posts that already reference it continue to work. They hold their own reference to the media at the time of attachment, so deleting the library record does not break a scheduled post.

Next

Upload media

Concrete upload recipes, including bulk import.

Posts

How media is referenced from a post.