Zoho Docs APIs
The Zoho Docs APIs provide partners and organizations with a more tightly integrated means of interacting with Zoho's applications for secure storage and document editing functionalities.
Zoho Docs APIs can be integrated into an existing document system extending the range of functionality. Partners can build their own applications and leverage the collaboration and document editing capabilities using integrated Zoho services. The Zoho Docs APIs provide a means for document storage and document editing so that partners can focus on their core applications and services rather than build and manage a storage solution.
Zoho Docs offers the following APIs:
Authentication
Auth Tokens and OAuth are currently used to authorize third-party applications to access Zoho Docs. Support for Auth tokens will soon be discontinued, and we recommend switching to Zoho OAuth for better security and control.
Zoho OAuth generates two tokens, Refresh and Access tokens. Access tokens are used to authenticate your apps on Zoho Docs and expire after an hour. Refresh tokens allow you to generate new access tokens.
Initial Setup
Before you get started, you'll have to register with us and set the application up.
- Register your application with our Zoho Accounts team.
- Go to https://accounts.zoho.com/developerconsole.
- Click Add Client ID.
- Enter your application's name, domain, authorized redirect URIs, and click Create.
- You will receive Client ID and Client Secret.
- You will have to construct a URL to generate a grant token. Click the "Generate Grant Token" section below to learn about the parameters required to construct the URL.
- Hit the constructed URL on your browser.
- Confirm whether your application can access the ZohoDocs APIs.
- Once you accept, you will receive a code (grant token) as a query string in the redirect URL.
- Get an access token and a refresh token by exchanging the code along with the Client ID and Client Secret.
Note:
Client ID: A unique identifier you receive when you register your application with Zoho.
Client Secret: A unique key generated when you register your application with Zoho. This must be kept confidential.
Client Name: Enter a name for your app. This is the name that users will see when asked to grant access to your application, and when they check the list of third-party apps that have access to their Zoho Accounts.
Client Domain: Enter your valid domain for Zoho Accounts reference.
Authorized redirect URI: The URI endpoint to which Zoho Accounts has to redirect the user-agent with the access token after authorizing the client.
Generate Grant Token
Method: POST
API: https://accounts.zoho.com/oauth/v2/auth
Query parameters:
PARAMETERS | DESCRIPTION |
scope (mandatory) | The specific module in the product for which the access has to be granted. |
client_id (mandatory) | The client ID received during registration. It is used to identify the application that raises the request. |
state | A string used by the client to ensure authenticity between the request and callback. It is a recommended parameter that’s used to prevent cross-site request forgery. |
response_type (mandatory) | code |
redirect_uri (mandatory) | The Redirect URI provided during registration. |
access_type | Set value as offline |
Note: For scope param
The minimum OAuth SCOPE required by each API is mentioned in the SCOPE section of that API.
If your OAuth token takes more than one scope then include them as a comma-separated list as a
scope param.
For state param - is optional, An opaque string that is round-tripped in the protocol; ie., whatever
value given to this will be passed back to you. e.g., testing
E.g., "ZohoPC.files.READ,ZohoPC.files.CREATE", else if you require all the defined
scopes use "ZohoPC.files.ALL".
Get Access and Refresh token
Method: POST
API: https://accounts.zoho.com/oauth/v2/token
Query parameters:
PARAMETERS | DESCRIPTION |
code (mandatory) | The code that you are exchanging for an access token. |
client_id (mandatory) | The Client ID received during registration. It is used to identify the application that raises the request. |
client_secret (mandatory) | The Client Secret received during registration. |
redirect_uri (mandatory) | The Redirect URI provided during registration. |
grant_type (mandatory) | authorization_code |
Regenerate Access token
Access tokens expire after an hour of generation. To generate a new access token, use the refresh token you generated earlier.
Method: POST
API: https://accounts.zoho.com/oauth/v2/token
Query parameters:
PARAMETERS | DESCRIPTION |
refresh_token (mandatory) | The refresh token obtained in this get Access and Refresh token. |
client_id (mandatory) | The Client ID received during registration. It is used to identify the application that raises the request. |
client_secret (mandatory) | The Client Secret received during registration. |
redirect_uri (mandatory) | The Redirect URI provided during registration. |
grant_type (mandatory) | refresh_token |
Scopes
In OAuth 2.0, scope is a mechanism to limit the client application's access to protected resources.
OAuth Scope | Purpose |
ZohoPC.files.CREATE | To create files/folder (eg: upload,create) |
ZohoPC.files.READ | To get the list of files/folders (eg: get list) |
ZohoPC.files.UPDATE | To update files/folders (eg: rename) |
ZohoPC.files.DELETE | To delete files/folders (eg: trash) |
Upload Files
/upload
Description | Uploads a file using POST semantics. | |||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/upload | |||||||||||||||
OAuth Scope | ZohoPC.files.CREATE | |||||||||||||||
Method | POST | |||||||||||||||
Parameters |
| |||||||||||||||
Returns | Returns the meta data of the uploaded document | |||||||||||||||
Errors | 404 User is not valid 9837 Missing Content | |||||||||||||||
Notes | This API supports maximum file size limit of 100 MB for free users and 250 MB for paid users. |
Sample Response for upload
"response":
[
{"uri":"/files/v1/upload"},
{"message":"UPLOAD_SUCCESS"},
{"result":
[
{"documentname":"Tulips.jpg"},
{"uploaddocid":"3yprga7361deb32524816b36e72f27baa02c9"}
]
}
]
}
Download Files
/download
Description | Downloads a file. | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/content/<DOC_ID> | ||||||
OAuth Scope | ZohoPC.files.READ | ||||||
Method | GET | ||||||
Parameters |
| ||||||
Returns | The specified file's content with the requested version. | ||||||
Errors | 9832 The file wasn't found for the given doc id. |
Manage File Metadata
/create
Description | Creates a new document or file | |||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/create | |||||||||||||||
OAuth Scope | ZohoPC.files.CREATE | |||||||||||||||
Method | POST | |||||||||||||||
Parameters |
| |||||||||||||||
Returns | Returns the success message | |||||||||||||||
Errors | 404 User is not valid 9822 Not a valid service type specified 9823 Error while creating a document |
/files
Description | Retrieves the user's files | ||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/files | ||||||||||||
OAuth Scope | ZohoPC.files.READ | ||||||||||||
Method | GET | ||||||||||||
Parameters |
| ||||||||||||
Returns | Specified category files. | ||||||||||||
Errors | 404 User is not valid 9830 The start parameter was not set correctly 9831 The limit parameter was not set correctly | ||||||||||||
Notes | This API also support the range to allow retrieving the partial file list. |
Sample Response for files
"FILES": [
{
"AUTHOR":"Tom Hill",
"AUTHOR_EMAIL":"tomhill@yahoo.com",
"LAST_MODIFIEDTIME_IN_MILLISECONDS":1371015460774,
"SCOPE":0,
"FILE_EXTN":"jpg",
"DOCID":"8tw2gf0022bc32fb94c4990f40658dd091983",
"DOCNAME":"Chrysanthemum.jpg",
"FOLDER_ID":"folder",
"LAST_MODIFIEDTIME":"Jun 11",
"SERVICE_TYPE":"upload",
"IS_LOCKED":false,
"FILETYPE":"image"
}
]
}
/copy
Description | Copies a file or document to a new location | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/copy | |||||||||
OAuth Scope | ZohoPC.files.CREATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the Success message | |||||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. |
Sample Response for copy
"response":
{
"result":
{"message":"DOCUMENT_COPIED_SUCCESSFULLY"},
"uri":"/files/v1/move"
}
}
/move
Description | Moves a file or document to a specified location | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/move | |||||||||
OAuth Scope | ZohoPC.files.UPDATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the Success message | |||||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. |
Sample Response for move
"response":
{
"result":
{"message":"DOCUMENT_MOVED_SUCCESSFULLY"},
"uri":"/files/v1/move"
}
}
/trash
Description | Moves the file to trash. | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/trash | ||||||
OAuth Scope | ZohoPC.files.DELETE | ||||||
Method | POST | ||||||
Parameters |
| ||||||
Returns | Returns the success message | ||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. |
Sample Response for trash
"response":
{
"result":
{"message":"DOCUMENT_TRASHED_SUCCESSFULLY"},
"uri":"/files/v1/move"
}
}
/restore
Description | Restores the file which has been trashed | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/restore | ||||||
OAuth Scope | ZohoPC.files.UPDATE | ||||||
Method | POST | ||||||
Parameters |
| ||||||
Returns | Returns the success message | ||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. |
Sample Response for Restore
"response":
{
"result":
{"message":"DOCUMENT_RESTORED_SUCCESSFULLY"},
"uri":"/files/v1/move"
}
}
/delete
Description | Files will be removed from user's account | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/delete | ||||||
OAuth Scope | ZohoPC.files.READ | ||||||
Method | POST | ||||||
Parameters |
| ||||||
Returns | Returns the success message | ||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. |
Sample Response for Delete
"response":
{
"result":
{"message":"DOCUMENT_DELETED_SUCCESSFULLY"},
"uri":"/files/v1/move"
}
}
/rename
Description | Renames the existing file or document | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/rename | |||||||||
OAuth Scope | ZohoPC.files.UPDATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the success message | |||||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. |
Sample Response for Rename
"response":
{"result":
{"DocumentDetails":
{"DocumentDetail":
{ "message":"DOCUMENT_RENAMED_SUCCESSFULLY",
"DOCUMENT_NAME":"chumma.png",
"DOCID":"3yprg69b889a4c0634f77986f948a38ce8b1c"
}
}
}
,"uri":"/files/v1/rename"
}
}
Share Files
/share
Description | Shares a file to a private email ID | ||||||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/share | ||||||||||||||||||
OAuth Scope | ZohoPC.files.CREATE | ||||||||||||||||||
Method | POST | ||||||||||||||||||
Parameters |
| ||||||||||||||||||
Returns | Returns the success message | ||||||||||||||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. 9839 The given email ID is not valid |
Sample Response for Share
response:
[
{
uri: "/files/v1/share"
},
{
message: "SHARED_DOCUMENT_SUCCESS"
},
{
result:
[
{
shareduserlist: "calvin@gmail.com,xylan@gmail.com,"
},
{
sharedgroupslist: "2345234,343424,3483439,143840,"
}
]
}
]
}
/visibility
Description | Sharing a file via link | ||||||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/share/visibility | ||||||||||||||||||
OAuth Scope | ZohoPC.files.UPDATE | ||||||||||||||||||
Method | POST | ||||||||||||||||||
Parameters |
| ||||||||||||||||||
Returns | Returns the success message with the generated link | ||||||||||||||||||
Errors | 404 User is not Valid 9832 The file wasn't found for the given docid. 9834 The visibility parameter is not valid |
Sample Response for visibility
response:
[
{
uri: "/files/v1/share/visibility"
},
{
message: "CHANGE_VISIBILITY_SUCCESS"
},
{
result:
[
{
permaLink:"https://docs.zoho.com/file/i5fa1a0081eed629b4f978aae3a6ab296790a"
}
]
}
]
}
/update
Description | Updates the permission of existing shared file | |||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/share/update | |||||||||||||||
OAuth Scope | ZohoPC.files.UPDATE | |||||||||||||||
Method | POST | |||||||||||||||
Parameters |
| |||||||||||||||
Returns | Returns the success message. | |||||||||||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. 9839 The given email ID is not valid 9834 The visibility parameter is not valid |
Sample Response for update
response:
[
{
uri: "/files/v1/share/update"
},
{
message: "UPDATE_SHARE_SUCCESS"
},
{
result:
[
{
documentid: "i5fa1a0081eed629b4f978aae3a6ab296790a"
}
]
}
]
}
/remove
Description | Removes the share permission for the shared user | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/share/remove | |||||||||
OAuth Scope | ZohoPC.files.UPDATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the success message | |||||||||
Errors | 404 User is not valid 9832 The file wasn't found for the given doc id. 9839 The given email ID is not valid |
Sample Response for remove
response:
[
{
uri: "/files/v1/share/remove"
},
{
message: "UNSHARED_DOCUMENT_SUCCESS"
},
{
result:
[
{
documentid: "i5fa1a0081eed629b4f978aae3a6ab296790a"
}
]
}
]
}
/details
Description | Returns the shared details of a document or file | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/share/details | ||||||
OAuth Scope | ZohoPC.files.READ | ||||||
Method | GET | ||||||
Parameters |
| ||||||
Returns | Returns the share details | ||||||
Errors | 9832 The file wasn't found for the given doc id. 404 User is not valid |
Sample Response for share details
"response":{
"result":{
"ReadOnly":{
"sharedGroups":"",
"sharedUserZuids":"",
"sharedEmails":"",
"sharedUsers":""
},
"coOwner":{
"sharedUserZuids":"",
"sharedEmails":"",
"sharedUsers":""
},
"ReadWrite":{
"sharedGroups":"332613,336474",
"sharedUserZuids":"2324,17560",
"sharedEmails":"",
"sharedUsers":"tomhill@abc.com,jamesandy@biz.com"
},
"visibility":"orgshare",
"permaLink":"https://docs.zoho.com/file/i5fa1a0081eed629b4f978aae3a6ab296790a"
},
"uri":"/files/v1/share/details"
}
}
File Revisions
/revision
Description | Revises the content of the existing file using POST semantics. | ||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/revision | ||||||||||||
OAuth Scope | ZohoPC.files.UPDATE | ||||||||||||
Method | POST | ||||||||||||
Parameters |
| ||||||||||||
Returns | Returns the Success message | ||||||||||||
Errors | 404 User is not valid 9837 Missing Content | ||||||||||||
Notes | This API supports maximum file size limit of 100 MB for free users and 500 MB for paid users. |
Sample Response for revision
"response":
[
{"uri":"/files/v1/revision"},
{"message":"Version Updated Successfully"},
{"result":
[
{"documentname":"Tulips.jpg"},
{"uploaddocid":"3yprga7361deb32524816b36e72f27baa02c9"}
]
}
]
}
/details
Description | Lists the revision details for the given document. | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/revision/details | |||||||||
OAuth Scope | ZohoPC.files.READ | |||||||||
Method | GET | |||||||||
Parameters |
| |||||||||
Returns | Returns the list of version details on success | |||||||||
Errors | 404 User is not valid 9832 Document not found for given docId. |
Sample Response for version details
"DOCTYPE":"image",
"FORMAT":"jpg",
"DOCID":"3yprga7361deb32524816b36e72f27baa02c9",
"DOCNAME":"Inventory stocks.jpg"
"VERSION_INFO":
[
{
"VERSION":"2.0",
"DOCSIZE":"777 KB",
"DOCUPLOADTIME":"Aug 29 12:24 PM 2013"
},
{
"VERSION":"1.0",
"DOCSIZE":"620 KB",
"DOCUPLOADTIME":"Aug 28 10:59 AM 2013"
}
]
}
Folders
/folders
Description | Returns the list of folders present in user's account | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders | ||||||
OAuth Scope | ZohoPC.files.READ | ||||||
Method | GET | ||||||
Parameters |
| ||||||
Returns | Returns the folders list | ||||||
Errors | 404 User is not valid |
Sample Response for folder
{"FOLDER_NAME":"My Folders","SUCCESS":"1"},
[
{
"FOLDER_ID":"3yprg626b688109df404da92acd6c5f1894a6",
"PARENT_FOLDER_ID":"1",
"FOLDER_NAME":"ABC"
}
]
]
/create
Description | Creates a new folder. | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders/create | |||||||||
OAuth Scope | ZohoPC.files.CREATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the newly created folder id | |||||||||
Errors | 404 User is not valid |
Sample Response for create folder
"response":
{
"result":
{"FolderDetails":
{"FolderDetail":
{
"message":"FOLDER_CREATED_SUCCESSFULLY",
"folder_name":"Projects",
"folder_id":"8tw2g62a6bc3d81da4c2c85646d679628aacb"
}
}
}
,"uri":"/files/v1/folders/create"
}
}
/rename
Description | Renames the existing folder | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders/rename | |||||||||
OAuth Scope | ZohoPC.files.UPDATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the success message | |||||||||
Errors | 404 User is not valid |
Sample Response for rename folder
"response":
{
"result":
{"FolderDetails":
{"FolderDetail":
{"message":"FOLDER_RENAMED_SUCCESSFULLY",
"folder_name":"testapi1",
"folder_id":"8tw2g62a6bc3d81da4c2c85646d679628aacb"
}
}
},
"uri":"/files/v1/folders/rename"
}
}
/move
Description | Moves the existing folder to specified location | ||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders/move | ||||||||||||
OAuth Scope | ZohoPC.files.UPDATE | ||||||||||||
Method | POST | ||||||||||||
Parameters |
| ||||||||||||
Returns | Returns the success message | ||||||||||||
Errors | 404 User is not valid |
Sample Response for move folder
"response":
{
"result":
{
"message":"FOLDER_MOVED_SUCCESSFULLY"
}
,"uri":"/files/v1/folders/move"
}
}
/copy
Description | Copies the existing folder to a specified folder | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders/copy | |||||||||
OAuth Scope | ZohoPC.files.CREATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the success message | |||||||||
Errors | 404 User is not valid |
Sample Response for copy folder
{"result":
{
"message":"COPY_FOLDER_SUCCESS",
"folderid":"3yprgba1a3aeccdfc44a1afc51e8aa3c99b26",
"status":"1"
},
"uri":"/files/v1/folders/copy"
}
}
/trash
Description | Folder will be moved to trashed | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders/trash | ||||||
OAuth Scope | ZohoPC.files.DELETE | ||||||
Method | POST | ||||||
Parameters |
| ||||||
Returns | Returns the success message | ||||||
Errors | 404 User is not valid |
Sample Response for trash folder
"response":
{
"result":
{
"message":"FOLDER_TRASHED_SUCCESSFULLY"
}
,"uri":"/files/v1/folders/move"
}
}
/restore
Description | Restores the folder which has been trashed | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders/restore | ||||||
OAuth Scope | ZohoPC.files.UPDATE | ||||||
Method | POST | ||||||
Parameters |
| ||||||
Returns | Returns the success message | ||||||
Errors | 404 User is not valid |
Sample Response for restore folder
"response":
{
"result":
{
"message":"FOLDER_RESTORED_SUCCESSFULLY"
}
,"uri":"/files/v1/folders/move"
}
}
/delete
Description | Deletes the folder from User's account | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders/delete | ||||||
OAuth Scope | ZohoPC.files.DELETE | ||||||
Method | POST | ||||||
Parameters |
| ||||||
Returns | Returns the success message | ||||||
Errors | 404 User is not valid |
Sample Response for delete folder
"response":
{
"result":
{
"message":"FOLDER_DELETED_SUCCESSFULLY"
}
,"uri":"/files/v1/folders/move"
}
}
/files
Description | Retrieves the files and folders present in that folder | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/folders/files | ||||||
OAuth Scope | ZohoPC.files.READ | ||||||
Method | GET | ||||||
Parameters |
| ||||||
Returns | Returns the list of files and folder | ||||||
Errors | 404 User is not valid |
Sample Response for files in folder
"FILES":
[
{
"FOLDER_ID":"cm31cdf8d437e1d89475490c8d78790c7478b",
"AUTHOR_ID":"4145547",
"LAST_MODIFIEDTIME_IN_MILLISECONDS":1369397398535,
"SCOPE":0,
"FILE_EXTN":"txt",
"DOCID":"cm31c1882749ac9de48518691c0e48111c083",
"LAST_MODIFIEDBY":"4145547",
"LAST_MODIFIEDTIME":"May 24",
"SERVICE_TYPE":"upload",
"IS_LOCKED":false,
"FILETYPE":"docs",
"DOCNAME":"ids.txt"
}
],
"FOLDER":
[
{
"PARENTFOLDERID":"cm31cdf8d437e1d89475490c8d78790c7478b",
"FOLDERID":"z1g204cd6a2f5080f459b8659f8e24a1bd61e",
"FOLDERNAME":"test"
}
]
}
Share Folders
/share
Description | Share folders to private email IDs | ||||||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/share | ||||||||||||||||||
OAuth Scope | ZohoPC.files.CREATE | ||||||||||||||||||
Method | POST | ||||||||||||||||||
Parameters |
| ||||||||||||||||||
Returns | Returns the success message | ||||||||||||||||||
Errors | 404 User is not valid. 9832 The folder was not found for the given folderid. 9839 The given email IDs are not valid. |
Sample Response for Share Folder
[
{"uri":"/files/v1/share"},
{"message":"SHARE_FOLDER_SUCCESS"},
{"result":
[
{"shareduserlist":"aravind694,"}
]
}
]
}
/visibility
Description | Sharing a folder via link | ||||||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/share/visibility | ||||||||||||||||||
OAuth Scope | ZohoPC.files.UPDATE | ||||||||||||||||||
Method | POST | ||||||||||||||||||
Parameters |
| ||||||||||||||||||
Returns | Returns the success message with the generated link | ||||||||||||||||||
Errors | 404 User is not Valid 9832 The folder was not found for the given folderid. 9834 The visibility parameter is not valid |
Sample Response for Visibility
[
{"uri":"/files/v1/share/visibility"},
{"message":"CHANGE_VISIBILITY_SUCCESS"},
{"result":
[
{"permaLink":"https://docs.zoho.com/folder/3yprgf644c24c4c7f43b79d852e02646109bd"}
]
}
]
}
/update
Description | Updates the permission of existing shared folder | |||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/share/update | |||||||||||||||
OAuth Scope | ZohoPC.files.UPDATE | |||||||||||||||
Method | POST | |||||||||||||||
Parameters |
| |||||||||||||||
Returns | Returns the success message. | |||||||||||||||
Errors | 404 User is not Valid 9832 The folder was not found for the given folderid. 9839 The given email IDs are not valid 9834 The visibility parameter is not valid |
Sample Response for update
[
{"uri":"/files/v1/share/update"},
{"message":"UPDATE_SHARE_SUCCESS"},
{"result":
[
{"folderid":"3yprgf644c24c4c7f43b79d852e02646109bd"}
]
}
]
}
/remove
Description | Removes the share permission for the shared user | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/share/remove | |||||||||
OAuth Scope | ZohoPC.files.UPDATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the success message. | |||||||||
Errors | 404 User is not Valid 9832 The folder was not found for the given folder id. 9839 The given email IDs are not valid |
Sample Response for Remove
[
{"uri":"/files/v1/share/remove"},
{"message":"UNSHARE_FOLDER_SUCCESS"},
{"result":
[
{"folderid":"3yprgf644c24c4c7f43b79d852e02646109bd"}
]
}
]
}
/details
Description | Returns the shared details of a folder | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/share/details | ||||||
OAuth Scope | ZohoPC.files.READ | ||||||
Method | GET | ||||||
Parameters |
| ||||||
Returns | Returns the share details | ||||||
Errors | 9832 The folder was not found for the given folderid. 404 User is not Valid |
Sample Response for Share Details
"response":{
"result":{
"ReadOnly":{
"sharedGroups":"",
"sharedUserZuids":"1482406",
"sharedEmails":"tomhill@abc.com",
"sharedUsers":""
},
"coOwner":{
"sharedUserZuids":"",
"sharedEmails":"",
"sharedUsers":""
},
"ReadWrite":{
"sharedGroups":"",
"sharedUserZuids":"",
"sharedEmails":"",
"sharedUsers":""
},
"visibility":"linkshare",
"permaLink":"https://docs.zoho.com/folder/i5fa1a0081eed629b4f978aae3a6ab296790a"
},
"uri":"/files/v1/share/details"
}
}
Tags
/tags
Description | Returns the list of user tags |
URL Structure | https://apidocs.zoho.com/files/v1/tags |
OAuth Scope | ZohoPC.files.CREATE |
Method | GET |
Returns | Returns the list of user tags |
Errors | 404 User is not valid |
Sample Response for tags
"UserTagDetails":
[
{
"tagName":"ABC",
"tagId":"403347000000204019"
}
]
}
/create
Description | Creates a new user tag | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/tags/create | ||||||
OAuth Scope | ZohoPC.files.CREATE | ||||||
Method | POST | ||||||
Parameters |
| ||||||
Returns | Returns the Tag Id | ||||||
Errors | 404 User is not valid |
Sample Response for create tag
"response":
{
"result":
{"TagDetails":
{
"message":"TAG_ADDED_SUCCESSFULLY",
"tag_name":"Required for Project",
"tag_id":"403347000000261006"
}
},
"uri":"/files/v1/tags/create"
}
}
/add
Description | Adds a tag to a file or a document | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/tags/add | |||||||||
OAuth Scope | ZohoPC.files.CREATE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the success message. | |||||||||
Errors | 9832 The file wasn't found for the given doc id. 404 User is not valid |
Sample Response for add tag
"response":
{
"result":
{
"TagDetails":
{
"message":"TAG_ADDED_SUCCESSFULLY",
"tags":"Related to Finance",
"taggedDocIds":"docids=cm31c1882749ac9de48518691c0e48111c083"
}
},
"uri":"/files/v1/tags/add"
}
}
/remove
Description | Removes the tag which is mapped to a document or file | |||||||||
URL Structure | https://apidocs.zoho.com/files/v1/tags/remove | |||||||||
OAuth Scope | ZohoPC.files.DELETE | |||||||||
Method | POST | |||||||||
Parameters |
| |||||||||
Returns | Returns the success message | |||||||||
Errors | 9832 The file wasn't found for the given doc id. 404 User is not valid |
Sample Response for remove tag
"response":
{
"result":
{
"message":"TAG_REMOVED_SUCCESSFULLY",
"unTaggedDocIds":"docids=cm31c1882749ac9de48518691c0e48111c083"
},
"uri":"/files/v1/tags/remove"
}
}
/delete
Description | Deletes the user tags from user account | ||||||
URL Structure | https://apidocs.zoho.com/files/v1/tags/delete | ||||||
OAuth Scope | ZohoPC.files.DELETE | ||||||
Method | POST | ||||||
Parameters |
| ||||||
Returns | Returns the success message | ||||||
Errors | 404 User is not valid |
Sample Response for delete tag
"response":
{
"result":
{
"message":"TAG_DELETED_SUCCESSFULLY"
}
,"uri":"/files/v1/tag/delete"
}
Publish
/publish
Description | Publishes a document to public or to the organization | |||||||||||||||
URL Structure | https://apidocs.zoho.com/files/v1/publish | |||||||||||||||
OAuth Scope | ZohoPC.files.CREATE | |||||||||||||||
Method | POST | |||||||||||||||
Parameters |
| |||||||||||||||
Returns | Returns the publish URL on success | |||||||||||||||
Errors | 404 User is not valid 9820 Not a valid file name 9821 Not a valid action parameter 9850 User not part of Org to publish within Organization 9832 Document Id is not found for the given docId. 9402 File Not supported for publish option. | |||||||||||||||
Notes | This API supports for image and PDF files only. |
Sample Response for publish
"response":
{
"result":
{"PublishURL":
{
"MESSAGE":"https://docs.zoho.com/file/3yprg7adc992a0f4d448e830934cc63a780f6"
}
}
,"uri":"/files/v1/publish"
}
}
Error Codes
Codes | Description |
404 | Not a valid user |
500 | Internal server error |
9832 | Invalid Document Id |
9830 | The start parameter was not set correctly |
9831 | The limit parameter was not set correctly |
9837 | Missing Content |
9838 | Restore Document Failed |
9839 | The given email addresses are not valid |
9834 | The visibility parameter is not valid |
9840 | Virus affected file |
9820 | Not a valid file name |
9821 | Not a valid action parameter |
9850 | User not part of Org to publish within Organization |
9402 | File Not supported for publish option |