Media
Upload files, import public URLs, and reuse media from your library.
On this page
Import from cloud storage
Use Import from in Compose or Media to choose files from Google Drive, Dropbox, or Canva. Copy an import token for one selected file and use it with POST /api/v1/media/import/cloud or MCP's import_from_cloud. The token lasts ten minutes and is scoped to the workspace.
In Media, you can watch a Drive or Dropbox folder for new files and save them to the library or schedule them for publishing.
Upload through a presigned URL
- Send
POST /api/v1/media/uploadswithmimeType,sizeBytes, and optionallyfileName. Files can be up to 1 GiB. Video metadata fields aredurationSeconds,width, andheight. - PUT the raw bytes to
uploadUrlwithinexpiresInseconds (15 minutes). Use the returnedContent-TypeandIf-None-Matchheaders and the exact content length. Send your Posthoop API key only to the Posthoop origin. - Send
POST /api/v1/media/{id}/completeto verify the upload and show it in the library. Creating a post with the ID verifies and completes a pending upload as well.
Accepted formats are MP4, MOV, WebM, JPEG, PNG, WebP, and PDF for LinkedIn document posts. YouTube requires dimensions and duration. TikTok videos require duration. Individual platforms can restrict formats and file sizes further.
For a batch of up to 50 files, send {"files": [...]} to the same endpoint. The uploads array is in input order. PUT and complete each file individually.
See the quickstart for the complete upload sequence in curl and JavaScript.
Import a file from a URL
Send POST /api/v1/media/import with a direct public HTTP or HTTPS file URL. The source must respond on the standard port and serve uncompressed media. Imports allow up to 100 MiB per file and follow up to three redirects. Pass video dimensions or duration in the same fields as an upload.
{
"url": "https://media.example.com/studio.jpg"
}The 201 response includes an id, mimeType, sizeBytes, and any supplied video metadata. The media is ready to attach. If imports are busy, see rate limits and errors.
Find and remove library items
Use GET /api/v1/media?q=studio&limit=24&offset=0 to list ready media. Search matches filenames, MIME types, or IDs. Use the returned nextOffset for the next page. When it is null, you have reached the end.
usage totals cover the workspace library, including video posters, regardless of the query. thumbnailUrl is a short-lived signed URL for an image or a video poster when one is available.
A Publishing admin key can call DELETE /api/v1/media/{id}. A successful delete returns 204. If a post still needs the file, the API returns 409.