Upload Media
upload_mediaUpload existing media for the selected brand. request reserves a pending asset and returns uploadUrl, assetId, method and constraints. PUT sends bytes with returned headers; POST_JSON sends localUpload with base64 bytes in localUpload.source.data. Then complete finalizes the upload and returns assetId and any hosted URL; complete with publicImage true also returns a permanent publicUrl for an image that an article uses as its cover or inline image. Does not attach media to anything; publicImage makes that one image publicly readable. To delete Library media use control_release(action=remove_asset).
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": {
"action": "<action>",
"input": "<input>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The fields of the chosen action. | |
| action | Yes | request: Reserve a pending asset for the selected brand and return uploadUrl, assetId, method, and constraints. complete: Finalize a presigned media upload. | |
| organization | No | Organization this call acts in: its name, slug or id from get_context(action=organizations). Required when the connection covers several organizations (a call without it is refused with the list of organizations and their brands); a connection limited to one organization works inside it, so leave this argument out there (naming any organization is refused). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| message | No |