Upload an image
upload_imageUploads an image to the deployment's asset store and returns its URL, for use as a variant's image (email tests) or url.
The returned URL is deliberately not fetchable on its own: assets are only served with a short-lived signature that the serve endpoints mint per request, so uploading here does not create free static hosting. Use previewUrl (valid for an hour) to check what was stored.
Storage is content-addressed: the id is the sha256 of the bytes, so uploading the same image twice is harmless and returns the same URL. Raster images only; SVG is refused because it can carry scripts. Not every deployment enables asset hosting, and this tool says so plainly when yours does not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The image bytes, base64-encoded (plain base64, not a data: URL). | |
| contentType | Yes | The image's actual type; the server stores and serves it as this. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Use this as the variant's image/url. 403s without a signature, by design. | |
| size | Yes | ||
| assetId | Yes | sha256 of the bytes; the id inside the URL. | |
| previewUrl | Yes | Signed for one hour, to verify the upload. | |
| contentType | Yes |