Media

Get pre-signed URL for media upload

Get a pre-signed S3 URL to upload images, videos, or PDF documents. Upload the file directly to S3 via HTTP PUT, then create a post. Upload URLs expire in 1 hour. The image count per post is platform-specific (up to 4 for Twitter/X, Bluesky, Mastodon; up to 10 for Instagram, LinkedIn, Facebook, Telegram; up to 20 for Threads), or 1 video per post. Attach multiple images to the same postGroupId to form a carousel; these post-media count rules do not apply to PDF document assets.

post/get-upload-url

Request

  • Base URL
    https://api.publora.com/api/v1
  • Auth
    API key in header x-publora-key

Headers

x-publora-user-idstring

Request body

fileNamestring required
contentTypestring required

MIME type. It must match an image/, video/, or application/pdf upload.

type'image' | 'video' | 'document'

Optional media-type hint; inferred from contentType when omitted

postGroupIdstring required

Post group to attach media to

Example request

{
  "fileName": "photo.jpg",
  "contentType": "image/jpeg",
  "type": "image",
  "postGroupId": "507f1f77bcf86cd799439011"
}

Response

Upload URL generated

successboolean
uploadUrlstring uri

Pre-signed S3 URL. PUT your file here.

fileUrlstring uri

Public URL after upload

mediaIdstring

Media record ID

Changes

No recorded changes to this operation across all 13 revisions of this API.