Create Image Upload Link
media_upload_link_createGet an upload link for a photo on the user's own device (phone/computer) — the right tool whenever the image is not already at a public URL. Pass pageId (+ editToken for demo pages) and the placement (e.g. header_photo). Returns uploadPageUrl, a page the user opens to pick their photo; it resizes the image for the web and attaches it to the page itself, so no media_attach call is needed. The link expires (see expiresAt). page_get shows the photo once it has been uploaded.
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": {
"pageId": "<pageId>"
},
"name": "media_upload_link_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | The pageId returned by page_create. | |
| altText | No | Meaningful alt text for the image. | |
| editToken | No | Required for anonymous demo pages. Use the editToken returned by page_create. | |
| placement | No | Where the image should be used. header_photo = business-card top photo, avatar = profile header avatar, block_image = image inside a block (requires blockId), gallery_item = appended to a gallery block, background = page background. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| url | No | ||
| pageId | No | ||
| status | Yes | ||
| altText | Yes | ||
| content | No | ||
| attached | No | ||
| nextStep | No | ||
| variants | No | ||
| deletedAt | No | ||
| expiresAt | No | ||
| placement | Yes | ||
| revisionId | No | ||
| uploadedAt | No | ||
| mediaAssetId | Yes | ||
| uploadPageUrl | No | ||
| revisionVersion | No |