File Version

WorkDrive allows users to manage a series of document versions and switch back to any previous version of a file without overwriting the current version.

Note:
  • For private team folders, a member must have the Editor role or higher to view the versions of a file.
  • For public team folders, any team folder member can view the versions of a file.
  • For shared files, any shared user can view their versions.

Download File Version OpenAPI Document
Download






Upload New Version

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 uploads a new version of a file.

Note:

  • This API will only upload files of size up to 250MB. To upload files more than 250MB, use Upload Large File API.

  • We recommend using Chunk File Upload API for files greater than 1 GB in size.

  • We have code samples for this API in multiple programming languages.See code samples

  • Only admins, organizers, and editors can upload files in a team folder.

Based on the status code in response, you can monitor the upload status of files.
Upload Status codes:
  • 200 - Returns File Meta in response.
  • 400 - Content parameter is missing.
  • 401 - Invalid user's credentials/ Parent folder not belong to the user.
  • 402 - WorkDrive license is in a suspended state.
  • 409 - Same file name already in this Parent folder. File will not be uploaded.
  • 413 - File size is greater than 250 MB.
  • 500 - An Unknown error occurred
  • 507 - User organization storage is full.
  • 509 - User's MyFolders storage is full.
Endpoints

OAuth Scope

WorkDrive.files.CREATECopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request POST \
  --url https://www.zohoapis.com/workdrive/api/v1/upload \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: multipart/form-data' \
  -F 'parent_id=string' \
  -F 'content=@file_path'

Request Body

multipart/form-data
filenamestring(Optional)

The name of the file should be URL encoded with UTF-8 Charset.

parent_idstring(Required)

The unique ID of the folder to be uploaded.

override-name-existstring(Optional)

Set "true" to upload the file as a new version.

contentbinary(Required)

Multi-part file to be uploaded, and the maximum file size is 250 MB.

Body Parameters

Copied!
// Note: payload contains multiple type attributes

// type: string
filename = string

// type: string
parent_id = string

// type: string
override-name-exist = string

// type: file
content = <file>
Show full

Response Example

D9236

D9236

D9237

R008

D9202

D9218

D9244

D9244

D9245

D9222

D9222

D9200

D9201

D9223

D9214

D9239

D9219

D9220

D9211

D9221

200
200
400
401
404
409
412
417
423
507
509
Copied!
  {
    "initParameterNames": {},
    "servletContext": {
      "initParameterNames": {},
      "virtualServerName": "string",
      "classLoader": {
        "parent": {},
        "unnamedModule": {
          "declaredAnnotations": [
            {}
          ],
          "named": true,
          "classLoader": {},
          "name": "string",
          "annotations": [
            {}
          ],
          "descriptor": {
            "automatic": true,
            "open": true
          },
          "packages": [
            "string"
          ],
          "layer": {}
        },
        "name": "string",
        "registeredAsParallelCapable": true,
        "definedPackages": [
          {
            "specificationVendor": "string",
            "declaredAnnotations": [
              null
            ],
            "specificationTitle": "string",
            "implementationVersion": "string",
            "sealed": true,
            "name": "string",
            "implementationVendor": "string",
            "annotations": [
              null
            ],
            "implementationTitle": "string",
            "specificationVersion": "string"
          }
        ]
      },
      "filterRegistrations": {
        "property1": {
          "initParameters": {
            "property1": "string",
            "property2": "string"
          },
          "name": "string",
          "className": "string",
          "servletNameMappings": [
            "string"
          ],
          "urlPatternMappings": [
            "string"
          ]
        },
        "property2": {
          "initParameters": {
            "property1": "string",
            "property2": "string"
          },
          "name": "string",
          "className": "string",
          "servletNameMappings": [
            "string"
          ],
          "urlPatternMappings": [
            "string"
          ]
        }
      },
      "servletNames": {},
      "contextPath": "string",
      "defaultSessionTrackingModes": [
        "COOKIE"
      ],
      "majorVersion": 0,
      "sessionCookieConfig": {
        "path": "string",
        "maxAge": 0,
        "domain": "string",
        "name": "string",
        "comment": "string",
        "httpOnly": true,
        "secure": true
      },
      "effectiveMinorVersion": 0,
      "effectiveSessionTrackingModes": [
        "COOKIE"
      ],
      "attributeNames": {},
      "servletRegistrations": {
        "property1": {
          "initParameters": {
            "property1": "string",
            "property2": "string"
          },
          "mappings": [
            "string"
          ],
          "runAsRole": "string",
          "name": "string",
          "className": "string"
        },
        "property2": {
          "initParameters": {
            "property1": "string",
            "property2": "string"
          },
          "mappings": [
            "string"
          ],
          "runAsRole": "string",
          "name": "string",
          "className": "string"
        }
      },
      "serverInfo": "string",
      "jspConfigDescriptor": {
        "jspPropertyGroups": [
          {
            "elIgnored": "string",
            "isXml": "string",
            "errorOnUndeclaredNamespace": "string",
            "trimDirectiveWhitespaces": "string",
            "scriptingInvalid": "string",
            "urlPatterns": [
              null
            ],
            "pageEncoding": "string",
            "includePreludes": [
              null
            ],
            "buffer": "string",
            "deferredSyntaxAllowedAsLiteral": "string",
            "defaultContentType": "string",
            "includeCodas": [
              null
            ]
          }
        ],
        "taglibs": [
          {
            "taglibLocation": "string",
            "taglibURI": "string"
          }
        ]
      },
      "servlets": {},
      "requestCharacterEncoding": "string",
      "responseCharacterEncoding": "string",
      "sessionTimeout": 0,
      "minorVersion": 0,
      "servletContextName": "string",
      "effectiveMajorVersion": 0
    },
    "servletConfig": {
      "initParameterNames": {},
      "servletContext": {
        "initParameterNames": {},
        "virtualServerName": "string",
        "classLoader": {
          "parent": {},
          "unnamedModule": {
            "declaredAnnotations": [
              null
            ],
            "named": true,
            "classLoader": {},
            "name": "string",
            "annotations": [
              null
            ],
            "descriptor": {},
            "packages": [
              null
            ],
            "layer": {}
          },
          "name": "string",
          "registeredAsParallelCapable": true,
          "definedPackages": [
            {
              "declaredAnnotations": [],
              "annotations": []
            }
          ]
        },
        "filterRegistrations": {
          "property1": {
            "initParameters": {},
            "name": "string",
            "className": "string",
            "servletNameMappings": [
              null
            ],
            "urlPatternMappings": [
              null
            ]
          },
          "property2": {
            "initParameters": {},
            "name": "string",
            "className": "string",
            "servletNameMappings": [
              null
            ],
            "urlPatternMappings": [
              null
            ]
          }
        },
        "servletNames": {},
        "contextPath": "string",
        "defaultSessionTrackingModes": [
          "COOKIE"
        ],
        "majorVersion": 0,
        "sessionCookieConfig": {
          "path": "string",
          "maxAge": 0,
          "domain": "string",
          "name": "string",
          "comment": "string",
          "httpOnly": true,
          "secure": true
        },
        "effectiveMinorVersion": 0,
        "effectiveSessionTrackingModes": [
          "COOKIE"
        ],
        "attributeNames": {},
        "servletRegistrations": {
          "property1": {
            "initParameters": {},
            "mappings": [
              null
            ],
            "runAsRole": "string",
            "name": "string",
            "className": "string"
          },
          "property2": {
            "initParameters": {},
            "mappings": [
              null
            ],
            "runAsRole": "string",
            "name": "string",
            "className": "string"
          }
        },
        "serverInfo": "string",
        "jspConfigDescriptor": {
          "jspPropertyGroups": [
            {
              "urlPatterns": [],
              "includePreludes": [],
              "includeCodas": []
            }
          ],
          "taglibs": [
            {}
          ]
        },
        "servlets": {},
        "requestCharacterEncoding": "string",
        "responseCharacterEncoding": "string",
        "sessionTimeout": 0,
        "minorVersion": 0,
        "servletContextName": "string",
        "effectiveMajorVersion": 0
      },
      "servletName": "string"
    },
    "servletInfo": "string",
    "servletName": "string"
  }
                
  {
    "errors": [
      {
        "id": "D9236",
        "title": "File extension is on the blocked list"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9237",
        "title": "File extension not in org-allowed list"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R008",
        "title": "Unauthorized access"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9202",
        "title": "File size exceeds the allowed limit"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9218",
        "title": "Duplicate filename with no override"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9244",
        "title": "Camera upload device folder not found"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9245",
        "title": "Invalid camera upload device folder"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9222",
        "title": "MyFolder storage restricted"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9200",
        "title": "Unhandled / unknown upload error"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9201",
        "title": "No file content found"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9223",
        "title": "Team folder library storage limit exceeded"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9214",
        "title": "Bad input ? missing folder/resource ID"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9239",
        "title": "OnBehalf user is not a member of the org"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9219",
        "title": "Permission denied"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9220",
        "title": "File locked by another user"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9211",
        "title": "Org storage quota exceeded"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "D9221",
        "title": "MyFolder storage quota exceeded"
      }
    ]
  }
                
Show full