Skip to content
Account

Zip Archive

Bundle several of your files into a single ZIP archive in one request. Each file may carry its own transformation parameters.

The endpoint fetches every file through the regular delivery pipeline (applying any transformations), streams them into a ZIP, and returns it as application/zip.

METHOD: POST
https://api.defaultuploader.com/v1/zip
# Content-Type: application/json
# Requires header — authorization: SECRET_CLIENT_TOKEN
JSON
{
"files": [
{ "type": "image", "path": "photo.jpg", "params": { "w": 200, "f": "webp" }, "name": "small.webp" },
{ "path": "subdir/cat.png" }
],
"archiveName": "export.zip"
}
FieldRequiredDescription
filesyesArray of files to include (1–100).
files[].pathyesFile path, the same as in the delivery URL after /v1/<type>/upload/<token>/. Subfolders are supported.
files[].typenoResource type: image (default), video, audio, text, application.
files[].paramsnoTransformation parameters applied to this file — the same as the image/video transform parameters (e.g. w, h, f).
files[].namenoFile name inside the archive. Defaults to path.
archiveNamenoName of the returned archive. Defaults to archive.zip.

The archive is returned as a stream with Content-Type: application/zip and Content-Disposition: attachment.

Files that cannot be fetched (missing, failed, etc.) are skipped — they do not fail the whole request. The archive always contains a _manifest.json at the root with the per-file result:

_manifest.json
[
{ "path": "photo.jpg", "name": "small.webp", "status": "ok", "size": 18324 },
{ "path": "subdir/cat.png", "status": "error", "code": 404 }
]
  • Up to 100 files per request.
  • A dedicated rate limit applies to this endpoint, because a single request fans out into multiple internal fetches.
  • path is validated: path traversal (..), query injection, and absolute paths are rejected with 400.
bash
curl --location 'https://api.defaultuploader.com/v1/zip' --header 'Authorization: YOUR_SECRET_CLIENT_TOKEN' --header 'Content-Type: application/json' --data '{"files":[{"path":"photo.jpg","params":{"w":200}},{"path":"logo.png","name":"brand.png"}],"archiveName":"export.zip"}' --output export.zip