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

# Create Folder Share Link

`POST /v1/folders/{id}/shares/shareLinks`

Creates a new share link on the provided folder with the provided settings. The `linkSecurity` parameter is only configurable for enterprise license users but is still required for team accounts. If an expiration is provided outside account-defined limits, it will be clamped to the maximum allowed time.

## Path parameters

- `id` number, required

## Request body

- object
  - `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.

## Response `201`

Created with a Folder Share Link resource containing information about the created 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.

---

[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)
