Create zip download


Creates a request to download multiple files and folders as a single zip archive file. This API does not return the archive but instead performs all the checks to ensure that the user has access to all the items, and then returns a download_url and a status_url that can be used to download the archive.

The limit for an archive is either 32GB or 10,000 files, whichever limitation is met first.



Request Body

stringin bodyoptional
January Financials

The optional name of the zip archive. This name will be appended by the .zip file extension, for example January

object arrayin bodyrequired

A list of items to add to the zip archive. These can be folders or files.

stringin bodyrequired

The identifier of the item to add to the archive. When this item is a folder then this can not be the root folder with ID 0.

stringin bodyrequired

The type of the item to add to the archive.

Value is one of file,folder.


application/jsonZip download

If the zip archive is ready to be downloaded, the API will return a response that will include a download_url, a status_url, as well as any conflicts that might have occurred when creating the request.

application/jsonClient error

Returns an error if some of the parameters are missing or not valid.

In most cases, this error might happen because the JSON request body is not valid JSON, any of the items has an incorrect or missing ID, any of the items is not a file or folder, or the root folder with ID 0 has been added to the list of folders to add to the archive.

The following is a list of common error codes for this response.

  • bad_request - the request body is missing, invalid, or both the list of files and folders are empty. Additionally, it this error might be returned when attempting to add the root folder with ID 0 to an archive.
  • zip_download_file_count_exceeded_limit - the requested files and folders would result in an archive with more than 10,000 files. The request will have to be split into multiple requests to reduce the number of files per archive.
  • zip_download_pre_compressed_bytes_exceeded_limit - the requested files and folders would result in an archive with more than 32GB of content. The request will have to be split into multiple requests to reduce the size of the archive.
application/jsonClient error

Returned when the access token provided in the Authorization header is not recognized or not provided.

application/jsonClient error

Returned when an authorization header is provided but the user does not have access to the items.

application/jsonClient error

An unexpected client error.

Create zip download
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

curl -i -X POST "" \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -d '{
       "download_file_name": "January Financials",
       "items": [
           "type": "file",
           "id": "12345"
           "type": "file",
           "id": "34325"
           "type": "folder",
           "id": "45678"
ArrayList<BoxZipItem> items = new ArrayList<BoxZipItem>();
BoxZipItem file = new BoxZipItem("file", "12345");
BoxZipItem folder = new BoxZipItem("folder", "156472");
BoxZip zip = new BoxZip(api);
BoxZipInfo zipInfo = zip.create("Awesome Zip File", items);

Response Example

  "type": "error",
  "code": "item_name_invalid",
  "help_url": "",
  "message": "Method Not Allowed",
  "request_id": "abcdef123456",
  "status": 400