External embeds

Learn to embed a Lucid diagram on another website

Introduction to Lucid Embeds

Lucid's Embed API enables you to display a Lucid document directly in your web page using an <iframe>, so users can view or edit the document directly without leaving your page. Pictured below is an example of a Lucid embed in Atlassian's Confluence web app:

Lucidspark document embedded in Confluence

Types of Lucid embeds

Lucid's Embed API offers two kinds of embeds: cookie-based and token-based.

  • Cookie-based embeds can only be viewed by users who already have permission to view the document in Lucid.
  • Token-based embeds allow anyone with access to your webpage to view the document, even if they don't have a Lucid account. This is because your app uses a temporary API token to authenticate the user.

Overall, the cookie-based embed API is significantly easier to use, but has fewer features. Here is a detailed comparison of the two types of embeds:

Cookie-based embedsToken-based embeds
Do users need a Lucid account to view the embedded document?YesNo
Do users need a Lucid account to edit the embedded document?YesYes
Do users need to have permission to view the document in Lucid?YesNo
Can users select a document using an embedded "document picker"?No*Yes
Can the app preselect a document based on a document URL the user provided?YesNo*
Is OAuth2 authorization required?NoYes
Can the embed settings be configured by the user as they insert an embed?NoYes:

- Access level (edit, comment only, view only)
- Viewer type (for view-only embeds)
- Snapshot mode (for view-only embeds)
- App-specific settings (if applicable)

Note: Features marked with an asterisk (*) might become available in the future as we improve our API. If these would be valuable for your specific needs, please let us know! We appreciate your feedback. ♥️

To get started building a Lucid embed integration, check out our tutorial for cookie-based embeds or our tutorial for token-based embeds!

If you have additional questions, check out the Embed API FAQ.

Examples of external embed implementations:

If you're looking to create an external embed that's available to everyone, sign up here to be a technology partner! We'd love to learn more about how you use Lucid and take our partnership to the next level.