v1

latestOpenAPI 3.0.2Apache-2.02026-07-142963051.0 MB
Zip Downloads

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 the Account's upload limit or 10,000 files, whichever is met first.

Note: Downloading a large file can be affected by various factors such as distance, network latency, bandwidth, and congestion, as well as packet loss ratio and current server load. For these reasons we recommend that a maximum ZIP archive total size does not exceed 25GB.

post/zip_downloads

Request body

download_file_namestring

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

Example request

{
  "items": [
    {
      "type": "file",
      "id": "12345"
    }
  ],
  "download_file_name": "January Financials"
}

Response

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.

download_urlstring

The URL that can be used to download the zip archive. A Get request to this URL will start streaming the items requested. By default, this URL is only valid for a few seconds, until the expires_at time, unless a download is started after which it is valid for the duration of the download.

It is important to note that the domain and path of this URL might change between API calls, and therefore it's important to use this URL as-is.

status_urlstring

The URL that can be used to get the status of the zip archive being downloaded. A Get request to this URL will return the number of files in the archive as well as the number of items already downloaded or skipped. By default, this URL is only valid for a few seconds, until the expires_at time, unless a download is started after which the URL is valid for 12 hours from the start of the download.

It is important to note that the domain and path of this URL might change between API calls, and therefore it's important to use this URL as-is.

expires_atstring date-time

The time and date when this archive will expire. After this time the status_url and download_url will return an error.

By default, these URLs are only valid for a few seconds, unless a download is started after which the download_url is valid for the duration of the download, and the status_url is valid for 12 hours from the start of the download.

Example response

{
  "download_url": "https://dl.boxcloud.com/2.0/zip_downloads/29l00nfxDyHOt7RphI9zT_w==nDnZEDjY2S8iEWWCHEEiptFxwoWojjlibZjJ6geuE5xnXENDTPxzgbks_yY=/content",
  "status_url": "https://api.box.com/2.0/zip_downloads/29l00nfxDyHOt7RphI9zT_w==nDnZEDjY2S8iEWWCHEEiptFxwoWojjlibZjJ6geuE5xnXENDTPxzgbks_yY=/status",
  "expires_at": "2020-07-22T11:26:08Z",
  "name_conflicts": [
    [
      {
        "id": "12345",
        "type": "file",
        "original_name": "Report.pdf",
        "download_name": "3aa6a7.pdf"
      },
      {
        "id": "34325",
        "type": "file",
        "original_name": "Report.pdf",
        "download_name": "5d53f2.pdf"
      }
    ]
  ]
}