ghl_media_upload_file
Upload files to media storage with support for direct binary uploads or hosted file URLs. Handles images/docs up to 25 MB and video up to 500 MB.
Instructions
multipart/form-data upload. body.file (binary) is required UNLESS body.hosted is true, in which case body.fileUrl is required instead — prefer the hosted:true + fileUrl path when the file already has a public URL, since this tool does not construct a multipart payload for you: the body you pass is sent to GHL as-is as the request body, so a raw binary file upload only works if the caller already has a pre-encoded multipart/form-data payload (including boundary) to hand it. Max 25MB (images/docs) / 500MB (video).
Upload File into Media Storage
If hosted is set to true then fileUrl is required. Else file is required. If adding a file, maximum allowed is 25 MB. For video files, the maximum allowed size is 500 MB.
Endpoint: POST /medias/upload-file (Version header: v3; source: v3/medias-v3.json)
OAuth scopes: medias.write
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Request body (schema carried verbatim from the official OpenAPI spec). |