Get Media Upload URLs
get_upload_urlsGet presigned upload URLs for direct file uploads. Returns uploadUrl (PUT your file here) and publicUrl (use in create_post mediaUrls). This only mints a URL. You MUST PUT the file to uploadUrl and confirm a 2xx response before using publicUrl, otherwise create_post/bulk rejects it with "Media file(s) not found in storage". If the PUT cannot reach uploadUrl, for example a sandbox network proxy answers 403 or the storage host is not on its allowlist, do not retry it, do not stop, and never put the files in a public repo or file-sharing link: call open_upload_widget and have the user add the files through the upload box or upload link it returns. If the files are ones you made, hand them to the user as downloads first. Prefer upload_media for public URLs and for inline files under 30 MB; use this for larger files you hold yourself. For each file, provide fileName and the mimeType that matches it. GIFs post only to Facebook, X, Bluesky, Mastodon, LinkedIn, Tumblr and WordPress, and the document types are for LinkedIn DOCUMENT posts. Keep the extension in fileName, since the post reads the file type from it. A publicUrl may be reused across any number of posts; the file is kept until the last post referencing it has published.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"files": "<files>"
},
"name": "get_upload_urls"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Files to get upload URLs for, one entry per file you will PUT | |
| workspaceId | No | Workspace to act in: an id from list_workspaces. Omit to act in the workspace list_workspaces marks current. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | An object with urls: one { uploadUrl, publicUrl, key } entry per requested file. |