Download Objects

Download single files or multiple files as a ZIP archive.
EndpointMethodAdmin Required
/api/v1/objects/downloadPOSTNo

Downloads one or more objects from a bucket you own. Single files are returned directly; multiple files or folders are packaged as a ZIP archive.

Request Body

bucket
string required
Name of the bucket to download from.
keys
string[] required
Array of object keys to download. Use trailing / for folders.
versionId
string
Specific version to download (for single file downloads only).

Single File Example

{
    "bucket": "my-bucket",
    "keys": ["documents/report.pdf"]
}

Multiple Files Example

{
    "bucket": "my-bucket",
    "keys": ["image1.png", "image2.png", "documents/"]
}

Specific Version Example

{
    "bucket": "my-bucket",
    "keys": ["report.pdf"],
    "versionId": "abc123def456"
}

Response

Single File

Returns the file with appropriate headers:

HeaderValue
Content-TypeFile's MIME type
Content-Dispositionattachment; filename="filename.ext"
Content-LengthFile size in bytes

Multiple Files / Folders

Returns a ZIP archive:

HeaderValue
Content-Typeapplication/zip
Content-Dispositionattachment; filename="{bucket}-download.zip"
Content-LengthZIP file size in bytes

Errors

StatusReason
400No keys provided
404Bucket not found, object not found, or delete marker
500Failed to read object or create ZIP