Create Upload URL
Generate a presigned URL for uploading large files (videos, high-res images) directly to storage. Use this when the file is too large for upload_media (>10MB) o
create_upload_url
Generate a presigned URL for uploading large files (videos, high-res images) directly to storage. Use this when the file is too large for upload_media (>10MB) or when you have a local file path. Flow: 1) Call this tool to get uploadUrl + media ID. 2) PUT the file to uploadUrl via curl. 3) Use the media ID in publish_post. Example curl: curl -X PUT "<uploadUrl>" -H "Content-Type: video/mp4" --data-binary @/path/to/file.mp4 The media is auto-confirmed when used in publish_post — no extra step needed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mimeType | string | yes | MIME type of the file (e.g. "video/mp4", "image/png"). |
filename | string | no | Original filename for reference. |
workspaceId | string | no | Workspace ID. Required if your API key accesses multiple workspaces. |
When to use
Use create_upload_url when the agent has a binary file (local disk, memory buffer, previously downloaded) and needs to push it into Postato's storage before publishing. This is the preferred path for known files because it streams directly from the client to object storage — Postato never buffers the binary.
For files already reachable at a public URL, skip this and pass the URL directly to publish_post — Postato fetches it asynchronously.
Typical flow
- Call
create_upload_urlwithfilename,mimeType, and optionallysizeBytes. - Receive a
uploadUrl(presigned PUT) and amediaId(med_...). - PUT the bytes to
uploadUrlwithContent-Type: <mimeType>. - Call
upload_media(orconfirmthe media record) to mark it ready. - Reference
mediaIdin apublish_postcall.
Example
{
"workspaceId": "wks_01H...",
"filename": "launch.mp4",
"mimeType": "video/mp4",
"sizeBytes": 18234567
}Response includes a short-lived uploadUrl. PUT the file content with the exact same mimeType header.
Gotchas
mimeTypeis required. The upload URL is signed against it — uploading with a different Content-Type will usually still succeed at the object store, but Postato will treat the DB record as the source of truth during publish. Keep them aligned.uploadUrlexpires (typically 15 minutes). If the upload takes longer, request a fresh one.- For files over 100 MB, prefer this flow over
upload_media(inline base64) to avoid payload size limits. - Media must be in a state of
uploadedbeforepublish_postcan attach it. Useget_mediato verify.
List Posts
Returns all posts for the authenticated tenant. Filter by status, platform, or postType. Results are ordered by creation date (newest first).
Upload Media
Upload media for use in posts. Two modes: 1. URL mode: provide a public URL — file is downloaded and stored. Best for images/videos from AI generators (DALL-E,