---
updatedAt: 2026-07-17T15:20:44.000Z
---

Fetch the complete documentation index at: https://lucid.readme.io/llms.txt. Use this file to discover all available pages before exploring further.

# Create Document Share Link

Creates a new share link on the provided document with the provided settings. The linkSecurity parameter is configurable only for enterprise license accounts but remains required for team accounts.

Creates a new share link on the provided document with the provided settings.

> 📘 Notes:
>
> * The `linkSecurity` is only configurable for users on accounts with an enterprise license but is still required for team accounts. For more information see [here](https://lucid.readme.io/lucid-developer-docs/reference/share-link-security).
> * If an expiration is provided outside the account defined limits, it will clamp to be the maximum possible time.
> * If the `restrictToAccount` field is provided as `false` and the **document's account** defined settings do not allow share links outside the account, it will restrict the share link to be within the account.

***

## Valid Authentication Methods

### OAuth 2.0 User Token Scopes:

* lucidchart.document.content.share.link
* lucidchart.document.app.picker.share.link
* lucidchart.document.app.folder
* lucidscale.document.content.share.link
* lucidscale.document.app.picker.share.link
* lucidscale.document.app.folder
* lucidspark.document.content.share.link
* lucidspark.document.app.picker.share.link
* lucidspark.document.app.folder

***

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Lucid Rest API",
    "description": "The Lucid REST API provides programmatic access to manage documents, users, folders, sharing, licensing, and audit logs across the Lucid Suite (Lucidchart, Lucidspark, and Lucidscale). Authenticate via OAuth 2.0 or API key.",
    "termsOfService": "https://lucid.co/developer-terms",
    "contact": {
      "name": "Lucid Software",
      "url": "https://community.lucid.co/developer-community-6/"
    },
    "license": {
      "name": "Lucid",
      "url": "https://lucid.co/developer-terms"
    },
    "version": "1.0.0"
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": false
  },
  "servers": [
    {
      "url": "https://api.lucid.co"
    }
  ],
  "tags": [
    {
      "name": "Documents Sharing",
      "description": "Create, retrieve, update, and delete share links for documents to control external access."
    }
  ],
  "paths": {
    "/v1/documents/{id}/shares/shareLinks": {
      "post": {
        "summary": "Create Document Share Link",
        "description": "Creates a new share link on the provided document with the provided settings. The linkSecurity parameter is configurable only for enterprise license accounts but remains required for team accounts.",
        "operationId": "createDocumentShareLink",
        "tags": [
          "Documents Sharing"
        ],
        "security": [
          {
            "OAuth2": [
              "lucidchart.document.content.share.link",
              "lucidchart.document.app.picker.share.link",
              "lucidchart.document.app.folder",
              "lucidscale.document.content.share.link",
              "lucidscale.document.app.picker.share.link",
              "lucidscale.document.app.folder",
              "lucidspark.document.content.share.link",
              "lucidspark.document.app.picker.share.link",
              "lucidspark.document.app.folder"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DocumentShareLinkDocumentId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "$ref": "#/components/schemas/SharingRole"
                  },
                  "linkSecurity": {
                    "$ref": "#/components/schemas/DocumentLinkSecurity"
                  }
                },
                "required": [
                  "linkSecurity",
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created with a Document Share Link resource containing information about the created share link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentShareLink"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request if the document does not belong to an enterprise account and the `restrictToAccount` is set to true, defines a passcode, or defines an expiration or the `allowAnonymous` field is set to true on non-Lucidspark/Lucidchart documents."
          },
          "403": {
            "description": "Forbidden if the app making the request does not have permission to the document, or if the document has been deleted, or does not exist."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DocumentLinkSecurity": {
        "type": "object",
        "properties": {
          "restrictToAccount": {
            "type": "boolean",
            "description": "Whether or not users outside the document's account can accept the share link. Changing this value to true will immediately revoke access for any external users who previously gained access through this link."
          },
          "expires": {
            "type": "string",
            "format": "date-time",
            "description": "If defined, the date and time the share link expires."
          },
          "passcode": {
            "type": "string",
            "description": "If defined, the required passcode to accept the share link. The passcode length must be between 1 – 80 characters.",
            "minLength": 1,
            "maxLength": 80
          },
          "allowAnonymous": {
            "type": "boolean",
            "description": "Whether or not the share link allows for anonymous guests."
          }
        },
        "required": [
          "restrictToAccount",
          "allowAnonymous"
        ],
        "example": {
          "restrictToAccount": false,
          "expires": "2023-12-11T21:48:35.293Z",
          "passcode": "password",
          "allowAnonymous": false
        }
      },
      "SharingRole": {
        "type": "string",
        "enum": [
          "editandshare",
          "edit",
          "comment",
          "view"
        ],
        "description": "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.\n- `editandshare`: View, comment on, edit, and control which users can access the document.\n- `edit`: View, comment on, and edit the document.\n- `comment`: View the document. Leave comments on the document.\n- `view`: View the document.\n"
      },
      "DocumentShareLink": {
        "type": "object",
        "properties": {
          "shareLinkId": {
            "type": "string",
            "description": "Id of the share link.",
            "example": "inv_8a38797a-e5fc-4479-8492-e000dc93cb60"
          },
          "documentId": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the document the share link belongs to.",
            "example": "f6bf19b5-d109-4ef5-92b2-cdaf0de43001"
          },
          "role": {
            "$ref": "#/components/schemas/SharingRole"
          },
          "linkSecurity": {
            "$ref": "#/components/schemas/DocumentLinkSecurity"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the share link was created.",
            "example": "2022-11-11T21:48:35.293Z"
          },
          "createdBy": {
            "type": "number",
            "description": "User Id of the user that created the share link.",
            "example": 1280
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the share link was last modified.",
            "example": "2022-11-11T21:48:35.293Z"
          },
          "acceptUrl": {
            "type": "string",
            "format": "uri",
            "description": "Link to accept the share link invitation.",
            "example": "https://lucid.app/lucidchart/f6bf19b5-d109-4ef5-92b2-cdaf0de43001/edit?invitationId=inv_8a38797a-e5fc-4479-8492-e000dc93cb60"
          }
        },
        "required": [
          "shareLinkId",
          "documentId",
          "role",
          "linkSecurity",
          "created",
          "createdBy",
          "lastModified",
          "acceptUrl"
        ]
      }
    },
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://lucid.app/oauth2/authorize",
            "tokenUrl": "https://api.lucid.co/oauth2/token",
            "refreshUrl": "https://api.lucid.co/oauth2/token",
            "scopes": {
              "account.audit.logs": "View audit logs on your account.",
              "account.info": "View basic information about your account (e.g., account ID and account name) .",
              "account.user": "Create, view, edit, and delete users on your account.",
              "account.user:readonly": "View users on your account.",
              "account.users:admin.readonly": "View all users and their roles on your account.",
              "account.user.transfercontent": "Transfer ownership of a user's resources to another user on your account.",
              "account.settings:readonly": "View settings on your account.",
              "account.legalhold": "Create, view, and expire legal holds on your account.",
              "account.legalhold:readonly": "View legal holds on your account.",
              "account.legalhold.users": "Manage legal hold users on your account.",
              "account.legalhold.users:readonly": "View legal hold users on your account.",
              "folder": "Create, view, edit, share, and delete your folders. Organize your folders and their contents.",
              "folder:readonly": "View any of your folders and list their contents.",
              "folder:admin": "Perform admin actions on folders belonging to the account.",
              "folder:admin.readonly": "View all folders belonging to the account with admin permissions.",
              "invitation": "Accept document and folder share links.",
              "invitation.accept": "Accept document and folder share links.",
              "cloud.credential": "Manage cloud credentials.",
              "cloud.credential:readonly": "View cloud credentials.",
              "cloud.datasource": "Manage cloud data sources.",
              "cloud.datasource:readonly": "View cloud data sources.",
              "cloud.model": "Manage cloud models.",
              "repository": "Manage repositories.",
              "repository:readonly": "View repositories.",
              "repository:admin": "Perform admin actions on repositories.",
              "lucid.document.content": "Create, view, edit, and delete any Lucid document accessible by the user.",
              "lucid.document.content:readonly": "View and download any Lucid document accessible by the user.",
              "lucid.document.content:admin": "Perform admin actions on Lucid documents belonging to the account.",
              "lucid.document.content:admin.readonly": "View all Lucid documents belonging to the account with admin permissions.",
              "lucid.document.content.share": "Create, view, edit, and delete document collaborators, embeds, and share links for any Lucid document accessible by the user.",
              "lucid.document.content.share:readonly": "View document collaborators, embeds, and share links for any Lucid document accessible by the user.",
              "lucid.document.content.share.collaborator": "Create, view, edit, and delete document collaborators for any Lucid document accessible by the user.",
              "lucid.document.content.share.collaborator:readonly": "View document collaborators for any Lucid document accessible by the user.",
              "lucid.document.content.share.embed": "Create, view, edit, and delete document embeds for any Lucid document accessible by the user.",
              "lucid.document.content.share.embed:readonly": "View document embeds for any Lucid document accessible by the user.",
              "lucid.document.content.share.link": "Create, view, edit, and delete share links for any Lucid document accessible by the user.",
              "lucid.document.content.share.link:readonly": "View share links for any Lucid document accessible by the user.",
              "lucid.document.storage:admin.readonly": "Perform admin actions backing up Lucid documents belonging to the account.",
              "lucid.document.app": "View, edit, create, and manage folders and documents within an app.",
              "lucid.document.app.folder": "Create, view, edit, and manage any Lucid document within its app-specific folder.",
              "lucid.document.app.picker": "View, edit, and manage any Lucid document selected within an app.",
              "lucid.document.app.picker:readonly": "View and download any Lucid document selected within an app.",
              "lucid.document.app.picker.share": "Create, view, edit, and delete document collaborators, embeds, and share links for any Lucid document selected within an app.",
              "lucid.document.app.picker.share:readonly": "View document collaborators, embeds, and share links for any Lucid document selected within an app.",
              "lucid.document.app.picker.share.collaborator": "Create, view, edit, and delete document collaborators for any Lucid document selected within an app.",
              "lucid.document.app.picker.share.collaborator:readonly": "View document collaborators for any Lucid document selected within an app.",
              "lucid.document.app.picker.share.embed": "Create, view, edit, and delete document embeds for any Lucid document selected within an app.",
              "lucid.document.app.picker.share.embed:readonly": "View document embeds for any Lucid document selected within an app.",
              "lucid.document.app.picker.share.link": "Create, view, edit, and delete share links for any Lucid document selected within an app.",
              "lucid.document.app.picker.share.link:readonly": "View share links for any Lucid document selected within an app.",
              "lucid.document.accessRequest": "Request access to Lucid documents.",
              "licenses:admin": "Perform admin actions on licenses and subscriptions belonging to the account.",
              "licenses:admin.readonly": "View licenses and subscriptions belonging to the account with admin permissions.",
              "teams": "Create, view, and edit, archive, and restore any teams on your account. Control which users belong to teams.",
              "teams:readonly": "View any teams on your account and list which users belong to them.",
              "teams:admin": "Manage teams on your account.",
              "lucidchart.document.app": "View, edit, and manage any Lucidchart document selected for this third-party application. Create, view, edit, and manage any Lucidchart document within its app-specific folder.",
              "lucidchart.document.app.folder": "Create, view, edit, and manage any Lucidchart document within its app-specific folder.",
              "lucidchart.document.app.picker": "View, edit, and manage any Lucidchart document selected for this third-party application.",
              "lucidchart.document.app.picker:readonly": "View and download any Lucidchart document selected for this third-party application.",
              "lucidchart.document.app.picker.share": "Create, view, edit, and delete document collaborators, embeds, and share links for any Lucidchart document selected for this third-party application.",
              "lucidchart.document.app.picker.share:readonly": "View document collaborators, embeds, and share links for any Lucidchart document selected for this third-party application.",
              "lucidchart.document.app.picker.share.collaborator": "Create, view, edit, and delete collaborators and invitations of any Lucidchart document on your team or enterprise account selected for the third-party application.",
              "lucidchart.document.app.picker.share.collaborator:readonly": "View collaborators and invitations of any Lucidchart document on your team or enterprise account selected for the third-party application.",
              "lucidchart.document.app.picker.share.embed": "Create, view, edit, and delete embeds of any Lucidchart document on your team or enterprise account selected for the third-party application.",
              "lucidchart.document.app.picker.share.embed:readonly": "View embeds of any Lucidchart document on your team or enterprise account selected for the third-party application.",
              "lucidchart.document.app.picker.share.link": "Create, view, edit, and delete the third party application's share links of any Lucidchart document on your team or enterprise account selected for the third-party application.",
              "lucidchart.document.app.picker.share.link:readonly": "View the third party application's share links of any Lucidchart document on your team or enterprise account selected for the third-party application.",
              "lucidchart.document.content": "Create, view, edit, and delete any Lucidchart document on your account.",
              "lucidchart.document.content:readonly": "View and download any Lucidchart document on your account.",
              "lucidchart.document.content:admin": "Perform admin actions on Lucidchart documents belonging to the account.",
              "lucidchart.document.content:admin.readonly": "View all Lucidchart documents belonging to the account with admin permissions.",
              "lucidchart.document.content.share": "Create, view, edit, and delete document collaborators, embeds, and share links for any of your Lucidchart documents.",
              "lucidchart.document.content.share:readonly": "View document collaborators, embeds, and share links for any of your Lucidchart documents.",
              "lucidchart.document.content.share.collaborator": "Create, view, edit, and delete collaborators and invitations for any of your Lucidchart documents on your team or enterprise account.",
              "lucidchart.document.content.share.collaborator:readonly": "View collaborators and invitations for any of your Lucidchart documents on your team or enterprise account.",
              "lucidchart.document.content.share.embed": "Create, view, edit, and delete embeds for any of your Lucidchart documents on your team or enterprise account.",
              "lucidchart.document.content.share.embed:readonly": "View embeds for any of your Lucidchart documents on your team or enterprise account.",
              "lucidchart.document.content.share.link": "Create, view, edit, and delete the third party application's share links for any of your Lucidchart documents on your team or enterprise account.",
              "lucidchart.document.content.share.link:readonly": "View the third party application's share links for any of your Lucidchart documents on your team or enterprise account.",
              "lucidchart.document.storage:admin.readonly": "Perform admin actions backing up Lucidchart documents belonging to the account.",
              "lucidchart.document.accessRequest": "Request access to Lucidchart documents.",
              "lucidspark.document.app": "View, edit, and manage any Lucidspark board selected for this third-party application. Create, view, edit, and manage any Lucidspark board within its app-specific folder.",
              "lucidspark.document.app.folder": "Create, view, edit, and manage any Lucidspark board within its app-specific folder.",
              "lucidspark.document.app.picker": "View, edit, and manage any Lucidspark board selected for this third-party application.",
              "lucidspark.document.app.picker:readonly": "View and download any Lucidspark board selected for this third-party application.",
              "lucidspark.document.app.picker.share": "Create, view, edit, and delete document collaborators, embeds, and share links for any Lucidspark board selected for this third-party application.",
              "lucidspark.document.app.picker.share:readonly": "View document collaborators, embeds, and share links for any Lucidspark board selected for this third-party application.",
              "lucidspark.document.app.picker.share.collaborator": "Create, view, edit, and delete collaborators and invitations of any Lucidspark board on your team or enterprise account selected for the third-party application.",
              "lucidspark.document.app.picker.share.collaborator:readonly": "View collaborators and invitations of any Lucidspark board on your team or enterprise account selected for the third-party application.",
              "lucidspark.document.app.picker.share.embed": "Create, view, edit, and delete embeds of any Lucidspark board on your team or enterprise account selected for the third-party application.",
              "lucidspark.document.app.picker.share.embed:readonly": "View embeds of any Lucidspark board on your team or enterprise account selected for the third-party application.",
              "lucidspark.document.app.picker.share.link": "Create, view, edit, and delete the third party application's share links of any Lucidspark board on your team or enterprise account selected for the third-party application.",
              "lucidspark.document.app.picker.share.link:readonly": "View the third party application's share links of any Lucidspark board on your team or enterprise account selected for the third-party application.",
              "lucidspark.document.content": "Create, view, edit, and delete any Lucidspark board on your account.",
              "lucidspark.document.content:readonly": "View and download any Lucidspark board on your account.",
              "lucidspark.document.content:admin": "Perform admin actions on Lucidspark boards belonging to the account.",
              "lucidspark.document.content:admin.readonly": "View all Lucidspark boards belonging to the account with admin permissions.",
              "lucidspark.document.content.share": "Create, view, edit, and delete document collaborators, embeds, and share links for any of your Lucidspark boards.",
              "lucidspark.document.content.share:readonly": "View document collaborators, embeds, and share links for any of your Lucidspark boards.",
              "lucidspark.document.content.share.collaborator": "Create, view, edit, and delete collaborators and invitations for any of your Lucidspark boards on your team or enterprise account.",
              "lucidspark.document.content.share.collaborator:readonly": "View collaborators and invitations for any of your Lucidspark boards on your team or enterprise account.",
              "lucidspark.document.content.share.embed": "Create, view, edit, and delete embeds for any of your Lucidspark boards on your team or enterprise account.",
              "lucidspark.document.content.share.embed:readonly": "View embeds for any of your Lucidspark boards on your team or enterprise account.",
              "lucidspark.document.content.share.link": "Create, view, edit, and delete the third party application's share links for any of your Lucidspark boards on your team or enterprise account.",
              "lucidspark.document.content.share.link:readonly": "View the third party application's share links for any of your Lucidspark boards on your team or enterprise account.",
              "lucidspark.document.storage:admin.readonly": "Perform admin actions backing up Lucidspark boards belonging to the account.",
              "lucidspark.document.accessRequest": "Request access to Lucidspark boards.",
              "lucidscale.document.app": "View, edit, and manage any Lucidscale model selected for this third-party application. Create, view, edit, and manage any Lucidscale model within its app-specific folder.",
              "lucidscale.document.app.folder": "Create, view, edit, and manage any Lucidscale model within its app-specific folder.",
              "lucidscale.document.app.picker": "View, edit, and manage any Lucidscale model selected for this third-party application.",
              "lucidscale.document.app.picker:readonly": "View and download any Lucidscale model selected for this third-party application.",
              "lucidscale.document.app.picker.share": "Create, view, edit, and delete document collaborators, embeds, and share links for any Lucidscale model selected for this third-party application.",
              "lucidscale.document.app.picker.share:readonly": "View document collaborators, embeds, and share links for any Lucidscale model selected for this third-party application.",
              "lucidscale.document.app.picker.share.collaborator": "Create, view, edit, and delete collaborators and invitations of any Lucidscale model on your team or enterprise account selected for the third-party application.",
              "lucidscale.document.app.picker.share.collaborator:readonly": "View collaborators and invitations of any Lucidscale model on your team or enterprise account selected for the third-party application.",
              "lucidscale.document.app.picker.share.embed": "Create, view, edit, and delete embeds of any Lucidscale model on your team or enterprise account selected for the third-party application.",
              "lucidscale.document.app.picker.share.embed:readonly": "View embeds of any Lucidscale model on your team or enterprise account selected for the third-party application.",
              "lucidscale.document.app.picker.share.link": "Create, view, edit, and delete the third party application's share links of any Lucidscale model on your team or enterprise account selected for the third-party application.",
              "lucidscale.document.app.picker.share.link:readonly": "View the third party application's share links of any Lucidscale model on your team or enterprise account selected for the third-party application.",
              "lucidscale.document.content": "Create, view, edit, and delete any Lucidscale model on your account.",
              "lucidscale.document.content:readonly": "View and download any Lucidscale model on your account.",
              "lucidscale.document.content:admin": "Perform admin actions on Lucidscale models belonging to the account.",
              "lucidscale.document.content:admin.readonly": "View all Lucidscale models belonging to the account with admin permissions.",
              "lucidscale.document.content.share": "Create, view, edit, and delete document collaborators, embeds, and share links for any of your Lucidscale models.",
              "lucidscale.document.content.share:readonly": "View document collaborators, embeds, and share links for any of your Lucidscale models.",
              "lucidscale.document.content.share.collaborator": "Create, view, edit, and delete collaborators and invitations for any of your Lucidscale models on your team or enterprise account.",
              "lucidscale.document.content.share.collaborator:readonly": "View collaborators and invitations for any of your Lucidscale models on your team or enterprise account.",
              "lucidscale.document.content.share.embed": "Create, view, edit, and delete embeds for any of your Lucidscale models on your team or enterprise account.",
              "lucidscale.document.content.share.embed:readonly": "View embeds for any of your Lucidscale models on your team or enterprise account.",
              "lucidscale.document.content.share.link": "Create, view, edit, and delete the third party application's share links for any of your Lucidscale models on your team or enterprise account.",
              "lucidscale.document.content.share.link:readonly": "View the third party application's share links for any of your Lucidscale models on your team or enterprise account.",
              "lucidscale.document.storage:admin.readonly": "Perform admin actions backing up Lucidscale models belonging to the account.",
              "lucidscale.document.accessRequest": "Request access to Lucidscale models.",
              "offline_access": "Continue to perform authorized actions when you're not logged in (required to refresh tokens).",
              "user.profile": "Allow applications to view basic information about you (e.g., full name, username, and email).",
              "document.app": "View, edit, and manage any Lucidchart document selected for this third-party application. Create, view, edit, and manage any Lucidchart document within its app-specific folder.",
              "document.app.folder": "Create, view, edit, and manage any Lucidchart document within its app-specific folder.",
              "document.app.picker": "View, edit, and manage any Lucidchart document selected for this third-party application.",
              "document.app.picker:readonly": "View and download any Lucidchart document selected for this third-party application.",
              "document.content": "Create, view, edit, and delete any Lucidchart document on your account.",
              "document.content:readonly": "View and download any Lucidchart document on your account."
            }
          }
        }
      }
    },
    "parameters": {
      "DocumentShareLinkDocumentId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "ID of the document."
      }
    }
  }
}
```