Appearance
Upload an image
bash
POST /v1/assets/upload
Authorization: Bearer mms_live_YOUR_KEY
Content-Type: multipart/form-data
file=@photo.jpgjson
{
"url": "https://res.cloudinary.com/mms/image/upload/..."
}The returned URL is a permanent Cloudinary CDN URL. Pass it as the src prop of an Image block.
Supported formats
| Format | MIME type |
|---|---|
| JPEG | image/jpeg |
| PNG | image/png |
| WebP | image/webp |
| GIF | image/gif |
Maximum file size: 10 MB.
Storage limits
Image storage counts against your plan's storageMb limit:
| Plan | Storage |
|---|---|
| Free | 50 MB |
| Pro | 500 MB |
| Agency | 3 GB |
| Enterprise | Unlimited |
Uploads that would exceed the limit return 402 Payment Required:
json
{ "error": "Storage limit reached — upgrade your plan" }JavaScript example
js
async function uploadImage(file) {
const form = new FormData();
form.append('file', file);
const res = await fetch('https://api.maillune.com/v1/assets/upload', {
method: 'POST',
headers: { Authorization: `Bearer ${API_KEY}` },
body: form,
});
if (!res.ok) {
const { error } = await res.json();
throw new Error(error);
}
const { url } = await res.json();
return url;
}The built-in image upload UI in the editor handles this automatically — you only need to call this endpoint directly if you're building a custom image picker.