Create External Share Custom Link
This API creates a new external share link for a file or folder.
Endpoints
post https://www.zohoapis.com/workdrive/api/v1/links
OAuth Scope
Request Example
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":true,"allow_download":true,"role_id":"7","resource_id":"cjrrr81bad43595d94a5bbbb4ea1589ef9236","input_fields":[{"field_type":"TEXT","is_name_field":true,"field_name":"Name"}],"password_text":"yourpassword","link_name":"notes","expiration_date":"2021-04-15 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","true");
att_param1.put("allow_download","true");
att_param1.put("role_id","7");
att_param1.put("resource_id","cjrrr81bad43595d94a5bbbb4ea1589ef9236");
innerattr_param=List();
innerattr_param_map1=Map();
innerattr_param_map1.put("field_name","Name");
innerattr_param_map1.put("field_type","TEXT");
innerattr_param_map1.put("is_name_field","true");
innerattr_param.add(innerattr_param_map1);
att_param1.put("input_fields",innerattr_param);
att_param1.put("password_text","yourpassword");
att_param1.put("link_name","notes");
att_param1.put("expiration_date","2021-04-15 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+jsonHide Sub-Attributes
Hide Sub-Attributes
Set as "true", if the user's information like name, phone and email are required.
Set as "true" to allow the "download" option for the shared user.
The ID that represents the role given to the shared user in the files/folders
Note:
For folders:
Only Editor, Upload, and Viewer roles are supported.
For native files (Document, Spreadsheet, or Presentation):
Only Editor, View & Comment, and Viewer roles are supported.
For other files:
Only Viewer role is supported.
The unique ID of the file/folder.
If the request_user_data is set as true, then the allowed values for input_fields will be
"field_name":"Name",
"field_type":"TEXT",
"is_name_field" : true
"field_type":"PHONE"
"field_name":"Email",
"field_type":"EMAIL_ID"
Show Sub-Attributes
Field data type. Supported values include TEXT, EMAIL_ID, PHONE.
Set true when this field captures the uploader name.
User-visible field label.
If set any text as password, the shared link can be accessed only with this password.
The name of the link to be shared.
If set any date, the share link will be deactivated after the expiry date.
Note:
Where hh is hours in 24 hours format.
The JSON:API resource type. Always "links".
Body Parameters
{
"data": {
"attributes": {
"request_user_data": true,
"allow_download": true,
"role_id": "7",
"resource_id": "cjrrr81bad43595d94a5bbbb4ea1589ef9236",
"input_fields": [
{
"field_type": "TEXT",
"is_name_field": true,
"field_name": "Name"
}
],
"password_text": "yourpassword",
"link_name": "notes",
"expiration_date": "2021-04-15 23:59:59"
},
"type": "links"
}
}
Response Example
R911
R233
R233
R234
R231
COL005
R909
R909
R265
R908
R262
F000
R906
R912
{
"data": {
"id": "3iWUoMURXKC-OCgNc",
"type": "links",
"attributes": {
"modified_time_i18": "Apr 13, 1:16 PM",
"created_time": "Apr 13, 1:16 PM",
"expiration_date": "Apr 15, 11:59 PM",
"expiration_date_in_millis": 1618511399000,
"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": true,
"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": "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"
}
]
}
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.