Postato Docs
MCP ToolsTools

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

ParameterTypeRequiredDescription
mimeTypestringyesMIME type of the file (e.g. "video/mp4", "image/png").
filenamestringnoOriginal filename for reference.
workspaceIdstringnoWorkspace 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

  1. Call create_upload_url with filename, mimeType, and optionally sizeBytes.
  2. Receive a uploadUrl (presigned PUT) and a mediaId (med_...).
  3. PUT the bytes to uploadUrl with Content-Type: <mimeType>.
  4. Call upload_media (or confirm the media record) to mark it ready.
  5. Reference mediaId in a publish_post call.

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

  • mimeType is 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.
  • uploadUrl expires (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 uploaded before publish_post can attach it. Use get_media to verify.

On this page