Write

Create media upload

Returns a private, short-lived upload URL for a file that has no public HTTPS link (a carousel PDF, an image, or an mp4). The file is sent with an HTTP PUT of its raw bytes to upload_url using the returned headers; the returned upload_id is then accepted by save_draft as media: [{ upload_id }], with id to attach it to an existing draft or scheduled post. The URL expires in 2 hours. Limits: images 5MB, video 75KB–200MB mp4, PDF 100MB.

post/create_upload

Request

  • Base URL: https://pdb.postpen.ai/functions/v1/agent-api
  • URL: https://pdb.postpen.ai/functions/v1/agent-api/create_upload
  • Auth: HTTP bearer

Request body

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

What you will upload: image (jpeg, png, webp, gif), video (mp4), or document (pdf).

content_typestring

Optional MIME type, for example image/png, video/mp4, or application/pdf. Defaults from type.

size_bytesinteger

Optional file size in bytes, checked against the limit before you upload.

Response

Success. JSON object; never contains LinkedIn tokens.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.