−

Create External Share Download Link

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 creates download external share links for files and folders stored in a team folder or my folders.

Here,the user can set a download limit and expiration for each download link.

Endpoints

post https://www.zohoapis.com/workdrive/api/v1/links

Copy full URL

OAuth Scope

WorkDrive.links.CREATECopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request POST \
  --url https://www.zohoapis.com/workdrive/api/v1/links \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/vnd.api+json' \
  --data '{"data":{"attributes":{"request_user_data":false,"allow_download":true,"download_link":{"download_limit":5},"resource_id":"cjrrr55b395f872ad4b0a8c52b02eab98c1c5","link_name":"report2021","expiration_date":"2021-05-01 23:59:59"},"type":"links"}}'
header = Map();
header.put("Accept","application/vnd.api+json");
data=Map();
data_param1=Map();
att_param1=Map();
att_param1.put("request_user_data","false");
att_param1.put("allow_download","true");
innerattr_param_map1=Map();
att_param1.put("download_link",innerattr_param_map1);
att_param1.put("resource_id","cjrrr55b395f872ad4b0a8c52b02eab98c1c5");
att_param1.put("link_name","report2021");
att_param1.put("expiration_date","2021-05-01 23:59:59");
data_param1.put("attributes",att_param1);
data_param1.put("type","links");
data.put("data",data_param1);
response = invokeurl
[
url : "https://www.zohoapis.com/workdrive/api/v1/links"
type : POST
parameters : data.toString()
headers : header
connection : "wdconnection"
];
info response;

Request Body

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

Should be "false".

allow_downloadboolean(Required)

Should be "true".

download_linkJSON Object(Optional)

download_limit - The maximum number of downloads allowed for the link.

Show Sub-Attributes
download_limitinteger(Optional)

Maximum number of downloads allowed per user.

resource_idstring(Required)

The unique ID of the file/folder.

link_namestring(Required)

The name of the link to be shared.

expiration_datestring(Optional)

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": {
        "request_user_data": false,
        "allow_download": true,
        "download_link": {
          "download_limit": 5
        },
        "resource_id": "cjrrr55b395f872ad4b0a8c52b02eab98c1c5",
        "link_name": "report2021",
        "expiration_date": "2021-05-01 23:59:59"
      },
      "type": "links"
    }
  }
                
▼ Show full

Response Example

R911

R233

R233

R234

R231

COL005

R909

R909

R265

R908

R262

F000

R906

R912

201
201
401
412
422
500
Copied!
  {
    "data": {
      "id": "3iWUoMUS63M-OCgNc",
      "type": "links",
      "attributes": {
        "modified_time_i18": "Apr 22, 11:47 AM",
        "link": "https://workdrive.zohoexternal.com/external/3iWUoMUS63M-OCgNc/download",
        "input_fields": [],
        "type": "image",
        "expiration_date": "May 1, 11:59 PM",
        "expiration_date_in_millis": 1619893799000,
        "created_time_i18": "Apr 22, 11:47 AM",
        "request_user_data": false,
        "modified_time": "Apr 22, 11:47 AM",
        "role_id": 35,
        "download_url": "https://workdrive.zohoexternal.com/external/3iWUoMUS63M-OCgNc/download",
        "link_name": "report2021",
        "modified_time_in_millis": 1619072274419,
        "created_time": "Apr 22, 11:47 AM",
        "can_display_profile": false,
        "created_by": "Zylker Creation",
        "use_shorten_link": false,
        "allow_download": true,
        "link_type": "download",
        "download_link": {
          "download_limit": 5
        },
        "is_expired": false,
        "is_password_protected": false,
        "modified_by": "Zylker Creation",
        "resource_id": "cjrrr55b395f872ad4b0a8c52b02eab98c1c5",
        "created_time_in_millis": 1619072274419,
        "status": 1
      },
      "relationships": {
        "password": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc/relationships/password",
            "related": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc/password"
          }
        },
        "report": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc/relationships/report",
            "related": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc/report"
          }
        },
        "timeline": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc/relationships/timeline",
            "related": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc/timeline"
          }
        },
        "register": {
          "links": {
            "self": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc/relationships/register",
            "related": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc/register"
          }
        }
      },
      "links": {
        "self": "https://www.zohoapis.com/workdrive/links/3iWUoMUS63M-OCgNc"
      }
    }
  }
                
  {
    "errors": [
      {
        "id": "R911",
        "title": "External link sharing is not allowed"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R233",
        "title": "Invalid field_name and field_type combination"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R234",
        "title": "Input_fields Required, when RequestUserData is enabled"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R231",
        "title": "Input_fields cannot be NUll or Empty, when RequestUserData is enabled"
      }
    ]
  }
                
  {
    "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": "R908",
        "title": "Allow Download is restricted for View role from team folder settings"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R262",
        "title": "Team mandates password for all external links"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "F000",
        "title": "General exception"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R906",
        "title": "External sharing limit exceeded"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R912",
        "title": "download link creation disabled by settings"
      }
    ]
  }
                
▼ Show full

© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.