Skip to main content
POST
/
api
/
files
/
zip
Download or save multiple stored files as a single archive
curl --request POST \
  --url https://convertly.sh/api/files/zip \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fileIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "recursive": true,
  "format": "zip",
  "saveToFiles": false,
  "targetFolderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "file": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "filename": "<string>",
    "mime_type": "<string>",
    "size_bytes": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "downloadUrl": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Dashboard-generated Convertly API key. Keys currently begin with cvly_.

Body

application/json

Provide exactly one of fileIds or folderId. Omit both to archive the account's root-level files.

fileIds
string<uuid>[]

Explicit list of stored file IDs to include.

folderId
string<uuid> | null

Archive every file in this folder.

recursive
boolean
default:true

Used with folderId. When true, includes files in subfolders; the archive preserves the folder structure.

format
enum<string>
default:zip
Available options:
zip,
tar,
tgz
saveToFiles
boolean
default:false

When true, save the archive back to Convertly Storage and return JSON. When false, stream the archive bytes inline.

targetFolderId
string<uuid> | null

Where to save the archive when saveToFiles=true. Defaults to root.

Response

Archive bytes streamed as application/zip, application/x-tar, or application/gzip. When saveToFiles=true the response is JSON with the new stored file instead.

file
object
required