Upload up to 200 assets in one call
Uploads 1–200 assets, each as base64 bytes, plain bodyText (text keys only), or an importFromUrl. The key is the path after /assets/ — for example photos/hero.webp or style.css. Do not prefix it with assets/ or /. Keys may not contain .. segments or start with .dotsy/. A single file may be up to 5 MB on the Free plan and 10 MB on a paid plan, and video and audio need a paid plan. HTML files are not accepted. Raster images (not SVG) are optimized on upload: they are re-encoded as WebP and, for the hero and column intents, get a smaller -800 variant, so the stored key can differ from the one you sent. Send optimize: false (?optimize=0 on the raw upload) to store the bytes as sent; animated GIFs are always kept as sent. Items are stored in order, and the first item that fails stops the request: earlier items stay stored, and the error names the failing item in key. To upload one large file, send its raw bytes to assets-raw instead. Uploaded files are live in the editor and draft preview at once; the published site picks them up at the next publish.
Request
- Base URL: https://api.dotsy.ai
- URL: https://api.dotsy.ai/api/v1/sites/{slug}/assets/bulk
- Auth: HTTP bearer
Path parameters
Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.
Request body
Example request
{
"items": [
{
"key": "photos/hero.webp",
"contentType": "image/jpeg",
"importFromUrl": "https://example.com/photo.jpg"
}
]
}Response
Every item was stored.
Example response
{
"items": [
{
"key": "photos/hero.webp",
"originalKey": "photos/hero.jpg",
"contentType": "image/webp",
"suggestedSrcset": "photos/hero-800.webp 800w, photos/hero.webp 1600w"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.