Create Multiple Files/Folders as ZIP

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

This API compresses multiple files and folders as a ZIP folder and returns a WMS key.
The WMS key of the particular ZIP can be used in the Create Zip Progress API to retrieve metadata of the compressed content.

Endpoints

OAuth Scope

WorkDrive.files.READCopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request POST \
  --url https://www.zohoapis.com/workdrive/api/v1/createzip \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/vnd.api+json' \
  --data '{"data":{"attributes":{"destination_id":"6n758918f686c932a45fdbb08a699611761d7","name":"reports","resource_id":"jxtee81865c6d7ed64dc596540aa30dfd2753,cjrrr6d1a5111809e4704a025dde678a0c523"},"type":"files"}}'

Request Body

application/vnd.api+json
dataJSON Object(Required)
Hide Sub-Attributes
attributesJSON Object(Required)
Hide Sub-Attributes
destination_idstring(Required)

The Unique ID of the destination folder.

namestring(Required)

The name of the ZIP file.

resource_idstring(Required)

The unique IDs of the file/folder, separated by commas.

typestring(Required)

The JSON:API resource type. Always "files".

Allowed Values :
Show Values
filesCopied!
Copied!Copy all as JSON Array

Body Parameters

Copied!
  {
    "data": {
      "attributes": {
        "destination_id": "6n758918f686c932a45fdbb08a699611761d7",
        "name": "reports",
        "resource_id": "jxtee81865c6d7ed64dc596540aa30dfd2753,cjrrr6d1a5111809e4704a025dde678a0c523"
      },
      "type": "files"
    }
  }
                
Show full

Response Example

R801

R801

R024

R022

R021

F200

R008

R008

R021

R028

R028

R029

R026

R026

R027

R023

R020

R031

R030

R021

201
201
400
401
402
403
500
Copied!
  {
    "totalSize": 260182733,
    "wmsKey": "TD_DLD_1628786173496",
    "direct_zip": true,
    "totalFolders": 0,
    "totalFiles": 2
  }
                
  {
    "errors": [
      {
        "id": "R801",
        "title": "Resource with same name exists"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R024",
        "title": "Invalid parent Id"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R022",
        "title": "Count limit exceeded"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R021",
        "title": "Resource Ids are not valid for download"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "F200",
        "title": "Mandatory input fields missing"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R008",
        "title": "Authorization check failed"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R021",
        "title": "Authorization check failed"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R028",
        "title": "License is in suspend state"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R029",
        "title": "Upgrade your License to use the API"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R026",
        "title": "Myfolder storage limit exceeds"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R027",
        "title": "Storage limit exceeds"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R023",
        "title": "Count exceeds supported limit"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R020",
        "title": "File size too large"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R031",
        "title": "Destination team folder storage exceeded"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R030",
        "title": "Duplicate resources in input"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R021",
        "title": "Unknown Error"
      }
    ]
  }
                
Show full