Restore as Top Version
This API restores a specific version of a file to be the top version of the file.
Endpoints
OAuth Scope
WorkDrive.files.UPDATECopied!
curl --request POST \
--url https://www.zohoapis.com/workdrive/api/v1/versions \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'content-type: application/vnd.api+json' \
--data '{"data":{"attributes":{"revert_to":"5.0","resource_id":"cjrrr55b395f872ad4b0a8c52b02eab98c1c5"},"type":"versions"}}'Request Body
application/vnd.api+jsondataJSON Object(Required)
Hide Sub-Attributes
attributesJSON Object(Required)
Hide Sub-Attributes
revert_tostring(Required)
The version of the file that needs to be set as the top version.
resource_idstring(Required)
The unique ID of the file.
typestring(Required)
The JSON:API resource type. Always "versions".
Allowed Values :
Show Values ▾
versionsCopied!
Copy all as JSON Array
{
"data": {
"attributes": {
"revert_to": "5.0",
"resource_id": "cjrrr55b395f872ad4b0a8c52b02eab98c1c5"
},
"type": "versions"
}
}
{
"data": {
"id": "cjrrr55b395f872ad4b0a8c52b02eab98c1c5-2774428000000002078",
"type": "versions",
"attributes": {
"created_time": "Apr 13, 3:07 PM",
"is_locked": false,
"notes": "Reverted to version 3.0",
"capabilities": {
"can_read": true,
"can_edit": true,
"can_delete": true
},
"del_time": -1,
"created_time_in_milliseconds": 1618306634449,
"version_number": 5,
"version_id": 2774428000000002000,
"created_by": "Zylker Creation",
"file_size": 92684,
"file_id": 2774428000000002000,
"size_in_bytes": "90.0 KB",
"resource_id": "cjrrr55b395f872ad4b0a8c52b02eab98c1c5"
},
"links": {
"self": "https://www.zohoapis.com/workdrive/versions/cjrrr55b395f872ad4b0a8c52b02eab98c1c5-2774428000000002078"
}
}
}
{
"errors": [
{
"id": "R008",
"title": "Unauthorized access"
}
]
}
{
"errors": [
{
"id": "R006",
"title": "Invalid version/resource info"
}
]
}
{
"errors": [
{
"id": "R004",
"title": "Resource Details Empty"
}
]
}
{
"errors": [
{
"id": "V003",
"title": "Top version cannot be restored as top version"
}
]
}
{
"errors": [
{
"id": "F000",
"title": "General exception"
}
]
}
{
"errors": [
{
"id": "R1114",
"title": "Invalid params"
}
]
}
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.