Links
The Links API allows you to create, list, view, and delete shareable links to files and folders in your Egnyte domain. Links provide controlled access to content for internal and external collaborators.
Note: If you need a simple reference URL to a file or folder in the Egnyte Web UI (for users who already have permissions), use Deep Links instead.
Deep Links
Deep links provide direct access to files and folders in the Egnyte Web UI. Users must already have permission to view the resource.
Deep Links to Files and Folders
Deep links direct collaborators to the preview page for a file or folder in the browser. To obtain a deep link in the Web UI, select a file or folder, click Details, and copy the link under "Secured access for people with permissions."
File Deep Link (ID-based)
https://{domain}.egnyte.com/navigate/file/{entry_id}
Folder Deep Link (ID-based)
https://{domain}.egnyte.com/navigate/folder/{folder_id}
File Deep Link (Path-based)
https://{domain}.egnyte.com/navigate/path/{path_to_file}
Example
https://apidemo.egnyte.com/navigate/path/Shared/Projects/Presentation.pptx
Note: Path segments must be URL-encoded, but forward slashes (/) must remain unencoded.
Links API
The Links API provides programmatic control over shareable links. Use this API when you need to automate link creation, track link usage, or enforce link policies.
Base URL
https://{domain}.egnyte.com/pubapi/v1/links
Version 2 endpoints use:
https://{domain}.egnyte.com/pubapi/v2/links
Authentication
All requests require an OAuth 2.0 Bearer token in the Authorization header:
Authorization: Bearer {access_token}
See Authentication for details on obtaining a token.
List Links
Lists all links visible to the authenticated user. Non-admin users can only see links they created. Admin users can see all links in the domain (excluding deleted links).
Request
GET /pubapi/v1/links
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | No | Filter links to a specific file or folder path |
username | string | No | Filter links created by this user |
created_before | string | No | Filter links created before this date (ISO-8601 or YYYY-MM-DD) |
created_after | string | No | Filter links created after this date (ISO-8601 or YYYY-MM-DD) |
type | string | No | Filter by link type: file or folder |
accessibility | string | No | Filter by accessibility: anyone, password, domain, or recipients |
offset | integer | No | 0-based index of the first record to return (for pagination) |
count | integer | No | Maximum number of entries to return (default and max: 500) |
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/links" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
| Field | Type | Description |
|---|---|---|
ids | array | Array of link IDs visible to the user |
offset | integer | 0-based index of the first record returned |
count | integer | Number of items returned (0 if not specified in request) |
total_count | integer | Total number of links visible to the user |
Example Response
{
"ids": [
"owTMm8H8Sg",
"KsiryUUgEo",
"ZJ8s7xmil5",
"hhkfvX6nq8",
"Kjw93J55sm"
],
"offset": 0,
"count": 0,
"total_count": 5
}
List Links v2
Lists all links with full details in a single response. Non-admin users can only see links they created.
Request
GET /pubapi/v2/links
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | No | Filter links to a specific file or folder path |
username | string | No | Filter links created by this user |
created_before | string | No | Filter links created before this date (ISO-8601, e.g., 2022-03-05T14:55:59%2B0000). The + must be URI-encoded as %2B. |
created_after | string | No | Filter links created after this date (ISO-8601, e.g., 2022-03-05T14:55:59%2B0000). The + must be URI-encoded as %2B. |
type | string | No | Filter by link type: file or folder |
accessibility | string | No | Filter by accessibility: anyone, password, domain, or recipients |
offset | integer | No | 0-based index of the first record to return (for pagination) |
count | integer | No | Maximum number of entries to return (default and max: 500) |
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v2/links" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
| Field | Type | Description |
|---|---|---|
links | array | Array of link objects with full details |
count | integer | Number of links returned |
Link Object Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique link identifier |
url | string | Full URL of the link |
path | string | Absolute path of the target file or folder |
type | string | Link type: file, folder, or upload |
accessibility | string | Access level: anyone, password, domain, or recipients |
protection | string | PREVIEW for preview-only links, otherwise NONE |
recipients | array | Email addresses to which the link was sent |
notify | boolean | Whether the creator is notified when the link is accessed |
link_to_current | boolean | Whether the link always refers to the current version (file links only) |
creation_date | string | ISO-8601 timestamp of link creation |
created_by | string | Username of the link creator |
resource_id | string | Group ID (file links) or folder ID (folder/upload links) |
expiry_clicks | integer | Number of clicks remaining before expiration (only present if applicable) |
expiry_date | string | ISO-8601 timestamp of expiration (only present if applicable) |
last_accessed | string | ISO-8601 timestamp of last access (only present if link has been accessed) |
Example Response
{
"links": [
{
"path": "/Shared/abcd/123.png",
"type": "file",
"accessibility": "anyone",
"protection": "NONE",
"recipients": [],
"notify": false,
"url": "https://apidemo.egnyte.com/dl/6a7ILnZZZ",
"id": "6a7ILnZZZ",
"link_to_current": false,
"creation_date": "2022-03-13T06:15:27+0000",
"created_by": "admin",
"resource_id": "6cc7ca12-c22e-4d22-b2ff-22222bc2228c",
"expiry_clicks": 4,
"last_accessed": "2022-03-16T10:34:12.000+0000"
},
{
"path": "/Private/someone",
"type": "folder",
"accessibility": "anyone",
"protection": "NONE",
"recipients": [],
"notify": false,
"url": "https://apidemo.egnyte.com/fl/e0ABCVDbo9",
"id": "e0ABCVDbo9",
"link_to_current": false,
"creation_date": "2022-03-12T11:30:01+0000",
"created_by": "admin",
"resource_id": "111a1111-32e1-111f-b164-1fe57c11caf1",
"expiry_date": "2021-10-07T06:59:59+0000",
"last_accessed": "2021-09-15T15:14:34.000+0000"
}
],
"count": 2
}
Show Link Details
Retrieves the full details of a specific link by ID.
Request
GET /pubapi/v1/links/{link_id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
link_id | string | Yes | Unique identifier of the link |
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/links/{linkId}" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
Returns a link object with the same structure as the Create a Link response.
Example Response
{
"links": [
{
"id": "47b774f66f344a67",
"url": "https://domain.egnyte.com/h-s/20130717/47b774f66f344a67",
"recipients": [
"jsmith@acme.com"
]
},
{
"id": "47b774f66f344a68",
"url": "https://domain.egnyte.com/h-s/20130717/47b774f66f344a68",
"recipients": [
"mjones@acme.com"
]
}
],
"path": "/Shared/Documents/example.txt",
"type": "file",
"accessibility": "recipients",
"notify": true,
"link_to_current": false,
"expiry_date": "2021-05-27",
"creation_date": "2021-05-02",
"created_by": "gbrown",
"last_accessed": "2021-05-20T11:41:34.000+0000"
}
Create a Link
Creates a new shareable link to a file, folder, or upload destination.
Request
POST /pubapi/v1/links
Request Body
Note: Boolean parameters (true, false) must be lowercase.
| Field | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Absolute path to the target file or folder (must include filename for files) |
type | string | Yes | Link type: file, folder, or upload |
accessibility | string | Conditional | Access level: anyone, password, domain, or recipients. Required unless useDefaultSettings is true or type is upload. |
useDefaultSettings | boolean | No | If true, uses domain-level defaults for accessibility, folder-level restrictions, and Content Safeguards policies. Not required if accessibility is provided or type is upload. |
send_email | boolean | No | If true, Egnyte sends the link via email to recipients |
recipients | array | Conditional | Array of email addresses. Required if send_email is true. |
message | string | No | Personal message included in link email (plain text; <br> and <p> tags supported). Only applies if send_email is true. |
copy_me | boolean | No | If true, sends a copy of the link email to the creator. Only applies if send_email is true. Default: false. |
notify | boolean | No | If true, notifies the creator via email when the link is accessed |
link_to_current | boolean | No | If true, link always refers to the current version of the file. If false, link refers to the latest available version. Only applies to file links. |
expiry_date | string | No | Link expiration date in YYYY-MM-DD format. Cannot be set if expiry_clicks is specified. |
expiry_clicks | integer | No | Number of clicks before link expires (1-10). Cannot be set if expiry_date is specified. |
add_file_name | boolean | No | If true, appends the filename to the link URL. Only applies to file links. |
password | string | No | Password for password-protected links (when accessibility is password). If not specified, a password is auto-generated. |
protection | string | No | Set to PREVIEW to create a preview-only link, or NONE for standard access |
folder_per_recipient | boolean | No | If true, each recipient's uploads are placed in a separate folder. Only applies to upload links. |
Example Request
curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/links" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "path": "/Shared/Documents/Engineering/Tech Talks/Aquamacs Manual.pdf", "type": "file", "accessibility": "anyone" }'
Response
201 Created
| Field | Type | Description |
|---|---|---|
links | array | Array of link objects (one per recipient if send_email is true) |
path | string | Absolute path of the target resource |
type | string | Link type: file, folder, or upload |
accessibility | string | Access level: anyone, password, domain, or recipients |
notify | boolean | Whether the creator is notified on access |
link_to_current | boolean | Whether the link refers to the current version (file links only) |
expiry_date | string | Expiration date in YYYY-MM-DD format (if applicable) |
creation_date | string | Creation date in YYYY-MM-DD format |
created_by | string | Username of the link creator |
Link Object Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique link identifier |
url | string | Full URL of the link |
recipients | array | Email addresses to which the link was sent |
Example Response
{
"links": [
{
"id": "47b774f66f344a67",
"url": "https://domain.egnyte.com/h-s/20130717/47b774f66f344a67",
"recipients": [
"jsmith@acme.com"
]
},
{
"id": "47b774f66f344a68",
"url": "https://domain.egnyte.com/h-s/20130717/47b774f66f344a68",
"recipients": [
"mjones@acme.com"
]
}
],
"path": "/Shared/Documents/example.txt",
"type": "file",
"accessibility": "recipients",
"notify": true,
"link_to_current": false,
"expiry_date": "2021-05-27",
"creation_date": "2021-05-02",
"created_by": "gbrown"
}
Delete a Link
Deletes a link by ID. The link will no longer be accessible.
Request
DELETE /pubapi/v1/links/{link_id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
link_id | string | Yes | Unique identifier of the link to delete |
Example Request
curl -i -X DELETE "https://{domain}.egnyte.com/pubapi/v1/links/{linkId}" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
The link is successfully deleted. No response body is returned.
Error Codes
| Status | Error | Description | Resolution |
|---|---|---|---|
| 400 | Bad Request | Invalid parameter value (e.g., expiry_clicks out of range, both expiry_date and expiry_clicks set) | Review request body and ensure parameters meet documented constraints |
| 401 | Unauthorized | Invalid or expired OAuth token | Refresh your OAuth token |
| 403 | Forbidden | Insufficient permissions to create, view, or delete the link | Ensure the user has appropriate permissions on the target resource |
| 404 | Not Found | Link ID or resource path does not exist | Verify the link ID or file/folder path |
| 429 | Rate Limited | Too many requests | Implement exponential backoff; check Retry-After header |
Code Examples
List Links
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/links" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Create a Link
curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/links" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "path": "/Shared/Documents/example.pdf", "type": "file", "accessibility": "anyone" }'
Related Resources
- Authentication — How to obtain and refresh OAuth tokens
- File System API — Manage files and folders programmatically
- Content Safeguards — Domain-level policies that affect link creation
