−
Update File/Folder Share Expiration
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 is used to update the expiration date for the shared files or folders.
Endpoints
OAuth Scope
WorkDrive.files.sharing.UPDATECopied!
Request Example
cURL
cURL
Deluge
Copied!
curl --request PATCH \
--url https://www.zohoapis.com/workdrive/api/v1/permissions/{permission_id} \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'content-type: application/vnd.api+json' \
--data '{"data":{"attributes":{"expiration_date":"1970-1-1 23:59:59"},"type":"permissions"}}'header = Map();
header.put("Accept","application/vnd.api+json");
data=Map();
data_param1=Map();
att_param1=Map();
att_param1.put("expiration_date","1970-1-1 23:59:59");
data_param1.put("attributes",att_param1);
data_param1.put("type","permissions");
data.put("data",data_param1);
response = invokeurl
[
url : "https://www.zohoapis.com/workdrive/api/v1/permissions/{permission_id}"
type : PATCH
parameters : data.toString()
headers : header
connection : "wdconnection"
];
info response;Path Parameters
permission_idstring(Required)
Collaboration ID
Request Body
application/vnd.api+jsondataJSON Object(Required)
Hide Sub-Attributes
attributesJSON Object(Required)
Hide Sub-Attributes
expiration_datestring(Required)
Sets or updates the expiration time of an existing share. If not provided, the share remains active with no expiration.
Note:
Where hh is hours in 24 hours format.
typestring(Required)
The JSON:API resource type. Always "permissions".
Allowed Values :
Show Values ▾
permissionsCopied!
Copied!Copy all as JSON Array
Body Parameters
Copied!
{
"data": {
"attributes": {
"expiration_date": "1970-1-1 23:59:59"
},
"type": "permissions"
}
}
▼ Show full
Response Example
U038
U038
R012
R208
R220
COL005
200
200
401
405
422
Copied!
{
"data": {
"id": "cjrrr81bad43595d94a5bbbb4ea1589ef9236-747938058",
"type": "permissions",
"attributes": {
"email_id": "reyansh.ahuja@zylker.com",
"shared_time_in_millis": 1618298370952,
"shared_by": "Zylker Creation",
"expiry_in_millis": 0,
"relation_type": 0,
"expiration_date": "Jan 1, 1970, 5:30 AM",
"share_to_entity_info": {
"display_name": "Zylker Creation",
"email_id": "reyansh.ahuja@zylker.com",
"avatar_url": "https://contacts.zoho.com/file?t=user&ID=747938058&fs=thumb&nps=404"
},
"share_to_member_type": 1,
"role_id": 5,
"shared_time_i18": "Apr 13, 12:49 PM",
"shared_time": "Apr 13, 12:49 PM",
"shared_status": "ACTIVE",
"can_link_to_docs": true,
"owner": "747937818",
"allow_sharing_outside": false,
"shared_type": "personal",
"shared_to_entity": "Zylker Creation",
"delete_from_propagated_space": false,
"display_name": "Zylker Creation",
"message": "",
"share_to": "747938058",
"is_expired": false,
"shared_to_member_type": 1,
"avatar_url": "https://contacts.zoho.com/file?t=user&ID=747938058&fs=thumb&nps=404",
"is_password_protected": false,
"resource_id": "cjrrr81bad43595d94a5bbbb4ea1589ef9236",
"permalink": "https://www.zohoapis.com/workdrive/folder/cjrrr81bad43595d94a5bbbb4ea1589ef9236",
"shared_by_zuid": "747938014"
},
"links": {
"self": "https://www.zohoapis.com/workdrive/permissions/cjrrr81bad43595d94a5bbbb4ea1589ef9236-747938058"
}
}
}
{
"errors": [
{
"id": "U038",
"title": "User is not allowed to give permission higher than their own permission"
}
]
}
{
"errors": [
{
"id": "R012",
"title": "Resource is not in active status to process this action"
}
]
}
{
"errors": [
{
"id": "R208",
"title": "Can not share libraries to user"
}
]
}
{
"errors": [
{
"id": "R220",
"title": "Can not change the role of a user with higher permission"
}
]
}
{
"errors": [
{
"id": "COL005",
"title": "The expiration date format should be in yyyy-mm-dd or yyyy-m-d hh:mm"
}
]
}
▼ Show full
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.