Change Expiration Settings

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 helps in changing the expiration date of the link.

Endpoints

OAuth Scope

WorkDrive.links.UPDATECopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request PATCH \
  --url https://www.zohoapis.com/workdrive/api/v1/links/{link_id} \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/vnd.api+json' \
  --data '{"data":{"attributes":{"expiration_date":"2021-10-01 23:59:59"},"type":"links"}}'

Path Parameters

link_idstring(Required)

The unique ID of the shared link

Request Body

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

Expiration time of the shared link. By default, the link won't expire. This field is optional.
format : "yyyy-mm-dd hh:mm:ss".

Note:
Where hh is hours in 24 hours format.

typestring(Required)

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

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

Body Parameters

Copied!
  {
    "data": {
      "attributes": {
        "expiration_date": "2021-10-01 23:59:59"
      },
      "type": "links"
    }
  }
                
Show full

Response Example

COL005

R909

R909

R265

F000

R262

200
200
422
500
Copied!
  {
    "data": {
      "id": "3iWUoMURXKC-OCgNc",
      "type": "links",
      "attributes": {
        "modified_time_i18": "Apr 14, 2:36 PM",
        "created_time": "Apr 13, 1:16 PM",
        "expiration_date": "Oct 1, 11:59 PM",
        "expiration_date_in_millis": 1718511559000,
        "link": "https://workdrive.zohoexternal.com/external/3iWUoMURXKC-OCgNc",
        "input_fields": [],
        "type": "folder",
        "can_display_profile": false,
        "created_by": "Zylker Creation",
        "use_shorten_link": false,
        "created_time_i18": "Apr 13, 1:16 PM",
        "allow_download": false,
        "request_user_data": false,
        "link_type": "custom",
        "modified_time": "Apr 13, 1:16 PM",
        "is_expired": false,
        "role_id": 34,
        "download_url": "https://workdrive.zohoexternal.com/external/3iWUoMURXKC-OCgNc/download",
        "is_password_protected": true,
        "modified_by": "Zylker Creation",
        "resource_id": "cjrrr81bad43595d94a5bbbb4ea1589ef9236",
        "created_time_in_millis": 1618299960679,
        "link_name": "notes",
        "modified_time_in_millis": 1618299960679,
        "status": 1
      },
      "relationships": {
        "password": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc/relationships/password",
            "related": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc/password"
          }
        },
        "report": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc/relationships/report",
            "related": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc/report"
          }
        },
        "timeline": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc/relationships/timeline",
            "related": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc/timeline"
          }
        },
        "register": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc/relationships/register",
            "related": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc/register"
          }
        }
      },
      "links": {
        "self": "https://www.zohoapis.com/workdrive/links/3iWUoMURXKC-OCgNc"
      }
    }
  }
                
  {
    "errors": [
      {
        "id": "COL005",
        "title": "The expiration date format should be in yyyy-mm-dd or yyyy-m-d hh:mm"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R909",
        "title": "Link name cannot be null or empty"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R265",
        "title": "Password failed to satisfy policy settings made by team"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "F000",
        "title": "General exception"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R262",
        "title": "Team mandates password for all external links"
      }
    ]
  }
                
Show full