---
title: "Update Folder Share Link"
method: PATCH
path: "/v1/folders/{id}/shares/shareLinks/{shareLinkId}"
tags: ["Folders Sharing"]
---

# Update Folder Share Link

`PATCH /v1/folders/{id}/shares/shareLinks/{shareLinkId}`

Updates an existing share link to the provided settings. If any settings are omitted, the existing settings are preserved. Share links are only updatable by the OAuth2.0 client that created them. If an expiration is provided outside the account-defined limits, it will be clamped to the maximum allowed time.

## Path parameters

- `id` number, required
- `shareLinkId` string, required

## Request body

- object
  - `role` 'editandshare' | 'edit' | 'comment' | 'view' — Roles determine what actions an invitation will grant on a document. Invitations to a document only grant the specified level of access to just that one document. If a link's role is changed, the new role applies immediately to all users who accessed via that link. - `editandshare`: View, comment on, edit, and control which users can access the document. - `edit`: View, comment on, and edit the document. - `comment`: View the document. Leave comments on the document. - `view`: View the document.
  - `linkSecurity` FolderLinkSecurity
    - `restrictToAccount` boolean, required — Whether the share link is restricted to users within the folder's account. Changing this value to true will immediately revoke access for any external users who previously gained access through this link.
    - `expires` string, date-time — If defined, the date and time the share link expires.
    - `passcode` string — If defined, the required passcode to accept the share link. The passcode length must be between 1 – 80 characters.

## Response `200`

OK with a Folder Share Link resource containing information about the updated share link.

- FolderShareLink
  - `shareLinkId` string, required — Id of the share link.
  - `folderId` number, required — Id of the folder the share link belongs to.
  - `role` 'editandshare' | 'edit' | 'comment' | 'view', required — Roles determine what actions an invitation will grant on a document. Invitations to a document only grant the specified level of access to just that one document. If a link's role is changed, the new role applies immediately to all users who accessed via that link. - `editandshare`: View, comment on, edit, and control which users can access the document. - `edit`: View, comment on, and edit the document. - `comment`: View the document. Leave comments on the document. - `view`: View the document.
  - `linkSecurity` FolderLinkSecurity, required
    - `restrictToAccount` boolean, required — Whether the share link is restricted to users within the folder's account. Changing this value to true will immediately revoke access for any external users who previously gained access through this link.
    - `expires` string, date-time — If defined, the date and time the share link expires.
    - `passcode` string — If defined, the required passcode to accept the share link. The passcode length must be between 1 – 80 characters.
  - `created` string, date-time, required — The date and time the share link was created.
  - `createdBy` number, required — User Id of the user that created the share link.
  - `lastModified` string, date-time, required — The date and time the share link was last modified.
  - `acceptUrl` string, uri, required — Link to accept the share link invitation.

## Other responses

- `400` — Bad Request if the folder does not belong to an enterprise account and the restrictToAccount is set to true, defines a passcode, or defines an expiration.
- `403` — Forbidden if the app making the request does not have permission to the folder, or if the folder has been deleted, or does not exist.
- `404` — Not Found if the share link id with the specified folder id does not belong to the folder, does not exist, or the requesting app did not create the share link.

---

[API](https://skmtc.net/lucid/apis/lucid-rest-api.md) · [All operations](https://skmtc.net/lucid/apis/lucid-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lucid/lucid-rest-api/revisions/6a32cb9e1aa7/schema)
