Skip to content

create_media_upload

posts:write

Start uploading an image or video file from your own machine (for a file that's already online, use import_media_from_url instead). Returns a presigned uploadUrl: PUT the raw file bytes to it within 15 minutes with the requiredHeaders (for example curl -X PUT -H 'content-type: video/mp4' --upload-file clip.mp4 '<uploadUrl>'), then call complete_media_upload with the returned key. Images: JPEG, PNG, WebP or GIF.

Video: MP4 (works everywhere), MOV or WebM, up to the plan's video size (300 MB on Starter, 1 GB on Founder). Uploads count toward the workspace's storage; get_usage shows what's left.

Input

  • kindstringrequired

    one of image, video

  • contentTypestringrequired

    min length 1

Permission

Needs the posts:write scope: create drafts. It changes your workspace, so clients may ask you to confirm each call.

Example call

Your assistant sends this for you. It is shown so you can see the shape of a call, with placeholder values for the required fields.

tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_media_upload",
"arguments": {
"kind": "image",
"contentType": "string"
}
}
}

Same action over the REST API

The tool runs POST /v1/orgs/{orgId}/marketing/media/upload-url as the signed-in user, with the same validation, approval rules and limits. See it in the Media API reference.