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 provide direct access to files and folders in the Egnyte Web UI. Users must already have permission to view the resource.

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.


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.


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

ParameterTypeRequiredDescription
pathstringNoFilter links to a specific file or folder path
usernamestringNoFilter links created by this user
created_beforestringNoFilter links created before this date (ISO-8601 or YYYY-MM-DD)
created_afterstringNoFilter links created after this date (ISO-8601 or YYYY-MM-DD)
typestringNoFilter by link type: file or folder
accessibilitystringNoFilter by accessibility: anyone, password, domain, or recipients
offsetintegerNo0-based index of the first record to return (for pagination)
countintegerNoMaximum 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

FieldTypeDescription
idsarrayArray of link IDs visible to the user
offsetinteger0-based index of the first record returned
countintegerNumber of items returned (0 if not specified in request)
total_countintegerTotal number of links visible to the user

Example Response

{
  "ids": [
    "owTMm8H8Sg",
    "KsiryUUgEo",
    "ZJ8s7xmil5",
    "hhkfvX6nq8",
    "Kjw93J55sm"
  ],
  "offset": 0,
  "count": 0,
  "total_count": 5
}

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

ParameterTypeRequiredDescription
pathstringNoFilter links to a specific file or folder path
usernamestringNoFilter links created by this user
created_beforestringNoFilter links created before this date (ISO-8601, e.g., 2022-03-05T14:55:59%2B0000). The + must be URI-encoded as %2B.
created_afterstringNoFilter links created after this date (ISO-8601, e.g., 2022-03-05T14:55:59%2B0000). The + must be URI-encoded as %2B.
typestringNoFilter by link type: file or folder
accessibilitystringNoFilter by accessibility: anyone, password, domain, or recipients
offsetintegerNo0-based index of the first record to return (for pagination)
countintegerNoMaximum 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

FieldTypeDescription
linksarrayArray of link objects with full details
countintegerNumber of links returned

Link Object Fields

FieldTypeDescription
idstringUnique link identifier
urlstringFull URL of the link
pathstringAbsolute path of the target file or folder
typestringLink type: file, folder, or upload
accessibilitystringAccess level: anyone, password, domain, or recipients
protectionstringPREVIEW for preview-only links, otherwise NONE
recipientsarrayEmail addresses to which the link was sent
notifybooleanWhether the creator is notified when the link is accessed
link_to_currentbooleanWhether the link always refers to the current version (file links only)
creation_datestringISO-8601 timestamp of link creation
created_bystringUsername of the link creator
resource_idstringGroup ID (file links) or folder ID (folder/upload links)
expiry_clicksintegerNumber of clicks remaining before expiration (only present if applicable)
expiry_datestringISO-8601 timestamp of expiration (only present if applicable)
last_accessedstringISO-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
}

Retrieves the full details of a specific link by ID.

Request

GET /pubapi/v1/links/{link_id}

Path Parameters

ParameterTypeRequiredDescription
link_idstringYesUnique 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"
}

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.

FieldTypeRequiredDescription
pathstringYesAbsolute path to the target file or folder (must include filename for files)
typestringYesLink type: file, folder, or upload
accessibilitystringConditionalAccess level: anyone, password, domain, or recipients. Required unless useDefaultSettings is true or type is upload.
useDefaultSettingsbooleanNoIf 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_emailbooleanNoIf true, Egnyte sends the link via email to recipients
recipientsarrayConditionalArray of email addresses. Required if send_email is true.
messagestringNoPersonal message included in link email (plain text; <br> and <p> tags supported). Only applies if send_email is true.
copy_mebooleanNoIf true, sends a copy of the link email to the creator. Only applies if send_email is true. Default: false.
notifybooleanNoIf true, notifies the creator via email when the link is accessed
link_to_currentbooleanNoIf 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_datestringNoLink expiration date in YYYY-MM-DD format. Cannot be set if expiry_clicks is specified.
expiry_clicksintegerNoNumber of clicks before link expires (1-10). Cannot be set if expiry_date is specified.
add_file_namebooleanNoIf true, appends the filename to the link URL. Only applies to file links.
passwordstringNoPassword for password-protected links (when accessibility is password). If not specified, a password is auto-generated.
protectionstringNoSet to PREVIEW to create a preview-only link, or NONE for standard access
folder_per_recipientbooleanNoIf 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

FieldTypeDescription
linksarrayArray of link objects (one per recipient if send_email is true)
pathstringAbsolute path of the target resource
typestringLink type: file, folder, or upload
accessibilitystringAccess level: anyone, password, domain, or recipients
notifybooleanWhether the creator is notified on access
link_to_currentbooleanWhether the link refers to the current version (file links only)
expiry_datestringExpiration date in YYYY-MM-DD format (if applicable)
creation_datestringCreation date in YYYY-MM-DD format
created_bystringUsername of the link creator

Link Object Fields

FieldTypeDescription
idstringUnique link identifier
urlstringFull URL of the link
recipientsarrayEmail 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"
}

Deletes a link by ID. The link will no longer be accessible.

Request

DELETE /pubapi/v1/links/{link_id}

Path Parameters

ParameterTypeRequiredDescription
link_idstringYesUnique 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

StatusErrorDescriptionResolution
400Bad RequestInvalid 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
401UnauthorizedInvalid or expired OAuth tokenRefresh your OAuth token
403ForbiddenInsufficient permissions to create, view, or delete the linkEnsure the user has appropriate permissions on the target resource
404Not FoundLink ID or resource path does not existVerify the link ID or file/folder path
429Rate LimitedToo many requestsImplement 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"
}'