Create media upload
create_uploadReturns 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 }] (an image item can add alt_text there), 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | What you will upload: image (jpeg, png, webp, gif), video (mp4), or document (pdf). | |
| size_bytes | No | Optional file size in bytes, checked against the limit before you upload. | |
| content_type | No | Optional MIME type, for example image/png, video/mp4, or application/pdf. Defaults from type. |