curl 'https://api.lucid.co/documents'\
--request 'POST'\
--header 'Authorization: Bearer <OAuth 2.0 Access Token>'\
--header 'Lucid-Api-Version: 1'\
--form 'file=@<location>/import.lucid;type=x-application/vnd.lucid.standardImport'\
--form 'title=New Document'\
--form 'product=lucidchart'\
--form 'parent=1234'
The Lucid Standard Import offers the ability to format JSON that can be used to import shapes, lines, groups, and more into a new Lucidchart or Lucidspark board.
The Standard Import can be accessed via Lucid's Import Document REST API endpoint, where the file and title are provided through the form data. If no title is specified, the document will be automatically assigned the name of the file.
The import request has an additional required
The Lucid Standard Import is evolving and over time more features may be added. If there is something missing, submit and request feedback in our Community feedback space.
Explore below to see the wide variety of objects we support as well as details on the format of each.
import.lucid
├── data
│ └── records.csv
├── images
│ └── logo.png
└── document.json
Lucid import files use a
Optional components:
Filesize limitations:
Here are some
Each link directs you to a folder in GitHub that contains a
You can also find examples of how to use the Standard Import in the
These examples solve some common use cases with the Standard Import. More information on how to use them "out-of-the-box" can be found in their respective
{
"version": 1,
"collections": [
{
"id": "network",
"dataSource": "Network.csv"
}
],
"pages": [
{
"id": "page1",
"title": "Main Plan",
"shapes": [...],
"lines": [...],
"groups": [...],
"layers": [...]
}
],
"extensionBootstrapData": {
"packageId": "74672098-cf36-492c-b8e6-2c4233549cd3",
"extensionName": "sheets-adapter",
"minimumVersion": "1.4.0",
"data": {
"a": 1,
"b": 2
}
}
}
The basic document format consists of a version tag, zero or more collections, and one or more pages, containing zero or more lines, shapes, groups, and/or layers.
All items within the document (pages, shapes, lines, layers, etc.) require a unique ID.
For information on the specific format of each JSON object, refer to each object's section of the documentation.
Property | Description |
---|---|
|
The specified version of the standard import to use. |
|
An array of page objects that define what shapes, groups, lines, etc. will be present on the specified page. Note that a minimum of one page is required. |
|
An array of collection objects to draw data from. |
|
Bootstrap data for a specific extension package. |
{
"packageId": "74672098-cf36-492c-b8e6-2c4233549cd3",
"extensionName": "sheets-adapter",
"minimumVersion": "1.4.0",
"data": {
"a": 1,
"b": 2
}
}
Bootstrap data can be attached to the created document to be consumed by a specific Extension Package. See Bootstrap Data for documents created via API for usage.
Property | Description |
---|---|
|
String Id of the extension package which will consume this data |
|
String Name of the editor extension which will consume this data Note: this is the |
|
String Minimum version of the extension package which will consume this data |
|
Map[String, String] Data to provide to the extension package |
Type | Example | Description |
---|---|---|
Boolean |
|
An RFC7159 JSON boolean value. |
String |
|
An RFC7159 JSON string value. |
Number |
|
An RFC7159 JSON number value. |
Integer |
|
An integer value formatted as an RFC7159 JSON number value. |
Decimal |
|
A decimal value formatted as an RFC7159 JSON number value. |
Color |
|
A hexadecimal RGB string representing a color. See Web Colors for implementation details. |
DateTime |
|
The date formatted as an RFC3339 timestamp string in the UTC time zone. |
Timestamp |
|
Number of milliseconds since the Unix epoch (January 1, 1970 in the UTC timezone). |
UUID |
|
A universally unique identifier (UUID) in the canonical textual representation format. |
URI |
|
A uniform resource identifier (URI) as defined in RFC3986. |
Array |
|
An array of values of other primitive types. |
Map |
|
A JSON object as defined in RFC7159. |
ID |
|
A string of one to thirty-six characters that are either alphanumeric or one of the following: |
Actions allow a resource to execute an event when selected. The different types of actions are described below.
Open another Lucid document
{
"type": "gotoDocument",
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"pageId": "page1",
"newWindow": true
}
Property | Description |
---|---|
|
The Lucid document to open. Action will fail if the |
|
Page to open on the document. Actions will fail if the page is not valid. |
|
Open the document in the current window or a new window. The default behavior is to open the document in the same window. |
Switch to a different page on the current document.
{
"type": "gotoPage",
"pageId": "page1"
}
Property | Description |
---|---|
|
Page to open on the current document. Actions will fail if the page is not valid. |
Hide one or more layers on the current document.
{
"type": "hideLayer",
"layers": [
"layer1",
"layer2"
]
}
Property | Description |
---|---|
|
Array of layer IDs to hide. |
Show one or more layers on the current document.
{
"type": "showLayer",
"layers": [
"layer1",
"layer2"
]
}
Property | Description |
---|---|
|
Array of layer IDs to show. |
Toggle between hidden or shown for one or more layers on the current document.
{
"type": "toggleLayer",
"layers": [
"layer1",
"layer2"
]
}
Property | Description |
---|---|
|
Array of layer IDs to toggle. |
Open a URL in the current window or a new window
{
"type": "url",
"url": "https://www.example.com",
"newWindow": true
}
Property | Description |
---|---|
|
The URL to open. |
|
Open the URL in the current window or a new window. The default behavior is to open the document in the same window. |
The defined container on the canvas for an object.
{
"x": 5,
"y": 3,
"w": 10,
"h": 15,
"rotation": 180
}
Property | Description |
---|---|
|
Absolute x position on the document. |
|
Absolute y position on the document. |
|
Width of the bounding box. |
|
Height of the bounding box. |
|
Rotation of the bounding box in degrees. Rotation is clockwise and bounded between 0 and 360 degrees. Note that not all shapes are affected by rotation. |
Provide data to your document that can be referenced within pages and shapes.
Set of key-value pairs embedded within a shape.
{
"key": "KeyOne",
"value": "TestOne"
}
Property | Description |
---|---|
|
Name of the data key needed to access the data pair. |
|
Value to be returned when the key is requested. |
Set of key-value pairs embedded within a page.
{
"key": "KeyOne",
"value": "TestOne",
"global": true
}
Property | Description |
---|---|
|
Name of the data key needed to access the data pair. |
|
Value to be returned when the key is requested. |
|
Add this pair to all shapes on the page. The default state is false. |
Set of references to data provided in an external datasouce, usually a
{
"collectionId": "CollectionOne",
"key": "9"
}
Property | Description |
---|---|
|
Collection source id. Refer to the Data section for more information. |
|
Value of key field defined by the collection source. |
Position represents a location on the canvas. As
An exact location on the canvas.
{
"x": 5.0,
"y": 3.5
}
Property | Description |
---|---|
|
Absolute x position on the document. As |
|
Absolute y position on the document. As |
A position relative to the length or width of another line or shape. Expressed as a decimal percentage from
{
"x": 0.25,
"y": 0.75
}
Property | Description |
---|---|
|
Relative x position along the line or shape. |
|
Absolute y position along the line or shape. |
The combined background and border style of a shape
{
"fill": {
"type": "color",
"color": "#ffffff"
},
"stroke": {
"color": "#6f2131",
"width": 3,
"style": "solid"
},
"rounding": 10
}
Property | Description |
---|---|
|
Fill of the shape. The default fill is a solid white background. |
|
Stroke of the line or shape border. The default stroke is a solid 1px black line. |
|
Rounding value for the shape border, equal to double the pixel value of the corner radius. |
Defines a shape's background. Can be a color or image.
Property | Description |
---|---|
|
Type of content to fill the shape with. The Standard Import accepts |
{
"type": "color",
"color": "#800080"
}
Fills the shape with a color.
Property | Description |
---|---|
|
Hexadecimal string representing a RGB or RGBA color value. |
{
"type": "image",
"ref": "image.png",
"imageScale": "fit"
}
{
"type": "image",
"url": "https://www.example.com/images/logo.png",
"imageScale": "stretch"
}
Fills the shape with an image. The image can be provided either within the
Property | Description |
---|---|
|
String Refer to the Images section for how to reference images. Importing will fail if the file can not be found. |
|
URL URL address pointing to an image. Importing will not check the validity of the image link. |
|
Defines the way the image fills the shape. This field defaults to |
Value | Description |
---|---|
|
Resizes the image to fit within a specified container while maintaining its aspect ratio, ensuring the entire image is visible with possible empty space around it. |
|
Resizes the image to completely fill a specified container, possibly cropping parts of the image to maintain the container's aspect ratio, ensuring the container is entirely covered by the image. |
|
Resizes the image to fill a specified container without maintaining the original aspect ratio, potentially causing distortion if the aspect ratios differ. |
|
Displays the image at its original size without resizing, showing only a portion if the container is smaller than the image. |
|
Repeats the image to fill the entire container both horizontally and vertically, creating a tiled pattern suitable for textures or backgrounds. |
Define the look of a line or border. May affect other aspects of certain shapes.
{
"color": "#ffffff",
"width": 10,
"style": "solid"
}
Property | Description |
---|---|
|
Hexadecimal string representing a RGB color to fill the line or border. The color defaults is black. |
|
Width of the line or border in pixels. The width defaults to 1px. |
|
Style of the line or border. The stroke style defaults to solid. |
Defines the look of a drawn line. Affects the border and other aspects of certain shapes.
Value | Description | Image |
---|---|---|
|
A solid line. | |
|
A dashed line. | |
|
A dotted line. |
Text to display on the shape or line. Formatting of the text can be by provided via raw HTML.
If a font size is not provided, all shapes will default to using auto-scaling font size.
{
"text": "Shape title"
}
Property | Description |
---|---|
|
Display text or Text and style formatting via the HTML style attribute. |
Text can be formatted via provding an HTML Style string. Any HTML style attributes not listed will be ignored. Some shapes may have a different default for certain fields based on their typical usage.
{
"text": "<p style=\"font-size: 5pt;text-align: left;color: green\">A paragraph with HTML formatting.</p>"
}
Value | Default |
---|---|
|
black |
|
Liberation Sans |
|
10pt |
|
normal |
|
normal |
|
center |
|
none |
|
center |
HTML markup can be provided in text to further format customize its behavior:
{
"text": "<ol><li><b>bold</b></li><li><a href=\"https://www.example.com\">visit example.com</a></li></ol>"
}
Markup | Behavior |
---|---|
|
Force a line break in the contained text. |
|
Apply |
|
Apply |
|
Apply |
|
Apply |
|
Apply |
|
Apply |
|
Apply |
|
Create an |
|
Create an |
|
Create an |
|
Create a |
A Page object represents all of the shapes, lines, groups, and layers contained on a single page of a given Lucid document.
The format to define a page in JSON is shown below:
{
"id": "page1",
"title": "Main Plan",
"shapes": [ ... ],
"lines": [ ... ],
"groups": [ ... ],
"layers": [ ... ],
"customData": [ ... ]
}
Property | Description |
---|---|
|
Identifier for a given page (must be unique). |
|
Page display title. |
|
An array of all shapes in the page. |
|
An array of all shapes in the page. |
|
An array of all lines in the page. |
|
An array of all groups in the page. |
|
An array of all layers in the page. |
|
See Custom Page Data for a description of it's purpose. |
Shapes are organized into libraries. Currently, JSON standard import supports shapes from the Standard Library, Shape Library, Container Library, Flowchart Library, and Lucidspark Library.
These properties are used on most or all shapes. Properties that are exclusive to a small set of shapes are defined near the shapes they're used on.
Property | Description |
---|---|
|
Identifier for a given shape (must be unique). |
|
The type of shape. An example of each shape is listed below. |
|
The associated Bounding Box for the shape. |
|
The style that will apply to the shape. |
|
Text to display on the shape. |
|
An array of all actions linked to the shape. |
|
An array of all custom data connected to the shape. |
|
An array of all linked data connected to the shape. |
|
A whole number between 0 (transparent) and 100 (completely opaque) inclusive, representing the opacity of the shape. Defaults to 100 when not provided. |
|
Text to add as a note to the shape. |
{
"id": "shape1",
"type": "rectangle",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape does not accept the
{
"id": "text1",
"type": "text",
"boundingBox": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape does not accept the
{
"id": "shape2",
"type": "hotspot",
"boundingBox": { ... },
"style": { ... },
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Property | Description |
---|---|
|
Define the look of the border. |
|
The image to fill the shape. |
{
"id": "shape3",
"type": "image",
"boundingBox": { ... },
"stroke": { ... },
"image": { ... },
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape4",
"type": "stickyNote",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape5",
"type": "circle",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape6",
"type": "cloud",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Property | Description |
---|---|
|
Determines the behavior of the indent on the shape. |
{
"id": "shape7",
"type": "cross",
"boundingBox": { ... },
"style": { ... },
"indent": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
A set of values that determines the appearance of the shape. Values must be between 0 and 0.5.
{
"x": 0.25,
"y": 0.25
}
Property | Description |
---|---|
|
A value that determines the size of the horizontal indent. |
|
A value that determines the size of the vertical indent. |
{
"id": "shape8",
"type": "diamond",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape9",
"type": "doubleArrow",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Property | Description |
---|---|
|
An array of positions. Must have between 3 and 100 vertices inclusive. Defines the border of the shape relative to the bounding box. |
{
"id": "shape10",
"type": "flexiblePolygon",
"boundingBox": { ... },
"style": { ... },
"vertices": [ ... ],
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape11",
"type": "hexagon",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape12",
"type": "isoscelesTriangle",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape13",
"type": "octagon",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape14",
"type": "pentagon",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Property | Description |
---|---|
|
Defines the shape of the star. |
{
"id": "shape15",
"type": "polyStar",
"boundingBox": { ... },
"style": { ... },
"shape": { ... },
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"numPoints": 5,
"innerRadius": 0.5
}
Property | Description |
---|---|
|
The number of points on the star. Must be between 3 and 25. |
|
The fraction of the total shape from the center of the star to each inner point. Must be between 0 and 1. |
{
"id": "shape16",
"type": "rectangle",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape17",
"type": "rightTriangle",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Property | Description |
---|---|
|
Determines the direction of the arrow. Defaults to "right". |
{
"id": "shape18",
"type": "singleArrow",
"boundingBox": { ... },
"orientation": "right",
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Determines the direction of the arrow.
Value | Description |
---|---|
|
A rightward-facing arrow. |
|
A leftward-facing arrow. |
|
An upward-facing arrow. |
|
A downward-facing arrow. |
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape19",
"type": "braceContainer",
"boundingBox": { ... },
"style": { ... },
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape20",
"type": "bracketContainer",
"boundingBox": { ... },
"style": { ... },
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape21",
"type": "circleContainer",
"boundingBox": { ... },
"style": { ... },
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape22",
"type": "diamondContainer",
"boundingBox": { ... },
"style": { ... },
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape23",
"type": "pillContainer",
"boundingBox": { ... },
"style": { ... },
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape24",
"type": "rectangleContainer",
"boundingBox": { ... },
"style": { ... },
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape25",
"type": "roundedRectangleContainer",
"boundingBox": { ... },
"style": { ... },
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines orientation of the swim lanes. |
|
Defines the behavior of the title bar of the swim lane. |
|
An array of swim lanes. |
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape26",
"type": "swimLanes",
"boundingBox": { ... },
"style": { ... },
"vertical": false,
"titleBar": { ... },
"lanes": [ ... ],
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"height": 50,
"verticalText": true
}
Property | Description |
---|---|
|
The height of the title bar. |
|
Determines the orientation of the title text. |
{
"title": "Swim lane 1",
"width": 300,
"headerFill": "#635DFF",
"laneFill": "#F2F3F5"
}
Property | Description |
---|---|
|
The title text of a swim lane. |
|
The width of a swim lane. All individual lane widths must add up to total swim lanes width or height, depending on orientation. |
|
Hexadecimal string representing a RGB or RGBA color value for the header fill. |
|
Hexadecimal string representing a RGB or RGBA color value for the lane fill. |
Property | Description |
---|---|
|
Determines the orientation of the brace. |
|
The width of the brace. |
{
"id": "shape27",
"type": "braceNote",
"boundingBox": { ... },
"style": { ... },
"text": "Note",
"rightFacing": false,
"braceWidth": 60,
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape28",
"type": "connector",
"boundingBox": { ... },
"style": { ... },
"text": "A",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape29",
"type": "database",
"boundingBox": { ... },
"style": { ... },
"text": "Database",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape29",
"type": "data",
"boundingBox": { ... },
"style": { ... },
"text": "Data",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape30",
"type": "decision",
"boundingBox": { ... },
"style": { ... },
"text": "Decision",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape31",
"type": "delay",
"boundingBox": { ... },
"style": { ... },
"text": "Delay",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape32",
"type": "directAccessStorage",
"boundingBox": { ... },
"style": { ... },
"text": "Hard disk",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape33",
"type": "display",
"boundingBox": { ... },
"style": { ... },
"text": "Display",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape34",
"type": "document",
"boundingBox": { ... },
"style": { ... },
"text": "Document",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape35",
"type": "internalStorage",
"boundingBox": { ... },
"style": { ... },
"text": "Internal storage",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape36",
"type": "manualInput",
"boundingBox": { ... },
"style": { ... },
"text": "Manual input",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape37",
"type": "manualOperation",
"boundingBox": { ... },
"style": { ... },
"text": "Manual operation",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape38",
"type": "merge",
"boundingBox": { ... },
"style": { ... },
"text": "Merge",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape39",
"type": "multipleDocuments",
"boundingBox": { ... },
"style": { ... },
"text": "Multiple documents",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape40",
"type": "note",
"boundingBox": { ... },
"style": { ... },
"text": "Note",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape41",
"type": "offPageLink",
"boundingBox": { ... },
"style": { ... },
"text": "Off-page link",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape does not accept the
{
"id": "shape42",
"type": "or",
"boundingBox": { ... },
"style": { ... },
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape43",
"type": "paperTape",
"boundingBox": { ... },
"style": { ... },
"text": "Paper tape",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Property | Description |
---|---|
|
The fraction of the block taken up by each side section. Must be between 0 and 0.33. |
{
"id": "shape44",
"type": "predefinedProcess",
"boundingBox": { ... },
"style": { ... },
"text": "Predefined process",
"sideWidth": 0.1,
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape45",
"type": "preparation",
"boundingBox": { ... },
"style": { ... },
"text": "Preparation",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape46",
"type": "process",
"boundingBox": { ... },
"style": { ... },
"text": "Process",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"id": "shape47",
"type": "storedData",
"boundingBox": { ... },
"style": { ... },
"text": "Stored data",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape does not accept the
{
"id": "shape48",
"type": "summingJunction",
"boundingBox": { ... },
"style": { ... },
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
See Swim Lanes in the Container Library
{
"id": "shape49",
"type": "terminator",
"boundingBox": { ... },
"style": { ... },
"text": "Terminator",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Property | Description |
---|---|
|
A line style specific to freehand drawings. |
|
An array of positions that define the shape of the freehand drawing. |
|
The position of the freehand drawing. All points are relative to the offset. |
{
"id": "shape50",
"type": "freehandDrawing",
"style": { ... },
"points": [ ... ],
"offset": { ... },
"note": "Test Note"
}
Property | Description |
---|---|
|
The thickness of the line. Must be between 0 and 100. |
|
Hexadecimal string representing a RGB or RGBA color value of the line. |
{
"id": "shape51",
"type": "sparkCalloutSquare",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape52",
"type": "sparkContainer",
"boundingBox": { ... },
"style": { ... },
"text": "Text",
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape53",
"type": "sparkFrame",
"boundingBox": { ... },
"style": { ... },
"title": "Frame 1",
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape has unique properties that give it a variety of appearances. See additional examples
Property | Description |
---|---|
|
The type of activity. |
|
Adds a task icon to the block. Defaults to none. |
|
Adds an activity marker to the block. Defaults to none. |
|
Adds an activity marker to the block. Defaults to none. |
{
"id": "shape54",
"type": "bpmnActivity",
"boundingBox": { ... },
"style": { ... },
"text": "Task",
"activityType": "task",
"taskType" "none",
"activityMarker1": "none",
"activityMarker2": "none",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Value |
---|
|
|
|
|
Value |
---|
|
|
|
|
|
|
|
|
Value |
---|
|
|
|
|
|
|
|
{
"id": "shape55",
"type": "bpmnBlackBoxPool",
"boundingBox": { ... },
"style": { ... },
"text": "Pool (Black Box)",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape has unique properties that give it a variety of appearances. See additional examples
Property | Description |
---|---|
|
The type of choreography. |
|
A list of non-initiating participants. There must be between 1 and 100 participants. |
|
The name of the initiator. |
|
The name of the task. |
|
Adds an initiating message icon to the block. Defaults to false. |
|
Adds a response message icon to the block. Defaults to false. |
{
"id": "shape56",
"type": "bpmnChoreography",
"boundingBox": { ... },
"style": { ... },
"choreographyType": "task",
"participants": [ ... ],
"name": "Participant A",
"taskName": "Task",
"initiatingMessage": false,
"responseMessage": false,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Value |
---|
|
|
|
{
"text": "Participant",
"multipleParticipants": false
}
Property | Description |
---|---|
|
The text of a participant. |
|
Adds a multiple participants icon to the participant. |
This shape has unique properties that give it a variety of appearances. See additional examples
Property | Description |
---|---|
|
Makes the block into a call block. Defaults to false. |
|
Makes the block into a sub-conversation block. Defaults to false. |
{
"id": "shape57",
"type": "bpmnConversation",
"boundingBox": { ... },
"style": { ... },
"text": "Conversation",
"isCall": false,
"isSubConversation": false,
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape has unique properties that give it a variety of appearances. See additional examples
Property | Description |
---|---|
|
The data type of the shape. Defaults to none. |
{
"id": "shape58",
"type": "bpmnDataObject",
"boundingBox": { ... },
"style": { ... },
"text": "Data",
"dataType": "none",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Value |
---|
|
|
|
|
{
"id": "shape59",
"type": "bpmnDataStore",
"boundingBox": { ... },
"style": { ... },
"text": "Data Store",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape has unique properties that give it a variety of appearances. See additional examples
Property | Description |
---|---|
|
The event group of the shape. |
|
The event type of the shape. Defaults to none. |
|
Determines the appearance of the shape. Defaults to false. |
|
Determines the appearance of the shape. Defaults to false. |
{
"id": "shape60",
"type": "bpmnEvent",
"boundingBox": { ... },
"style": { ... },
"text": "Event",
"eventGroup": "start",
"eventType": "none",
"nonInterrupting": false,
"throwing": false,
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Value |
---|
|
|
|
Value |
---|
|
|
|
|
|
|
|
|
|
|
|
|
|
This shape has unique properties that give it a variety of appearances. See additional examples
Property | Description |
---|---|
|
The gateway type of the shape. Defaults to none. |
{
"id": "shape61",
"type": "bpmnGateway",
"boundingBox": { ... },
"style": { ... },
"text": "Gateway",
"gatewayType": "none",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Value |
---|
|
|
|
|
|
|
|
|
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape62",
"type": "bpmnGroup",
"boundingBox": { ... },
"style": { ... },
"magnetize": true,
"text": "Group",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
This shape's bounding box is incompatible with the rotation property.
Property | Description |
---|---|
|
The title text of a pool. |
|
An array of pool lanes. There must be between 1 and 50 lanes. |
|
Determines orientation of the pool. Defaults to true. |
|
Determines orientation of the pool lane titles. Defaults to false. |
|
Determines whether shapes within the container move with the container. Defaults to true. |
{
"id": "shape63",
"type": "bpmnPool",
"boundingBox": { ... },
"style": { ... },
"title": "Pool",
"lanes": [ ... ],
"vertical": false,
"verticalLaneText": true,
"magnetize": true,
"actions": [ ... ],
"customData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
{
"title": "Lane",
"width": 300,
"laneFill": "#0000"
}
Property | Description |
---|---|
|
The title text of a pool lane. |
|
The width of a pool lane. All individual lane widths must add up to total pool width or height, depending on orientation. |
|
Hexadecimal string representing a RGB or RGBA color value for the lane fill. |
{
"id": "shape64",
"type": "bpmnTextAnnotation",
"boundingBox": { ... },
"style": { ... },
"text": "Annotation",
"actions": [ ... ],
"customData": [ ... ],
"linkedData": [ ... ],
"opacity": 100,
"note": "Test Note"
}
Data backed shapes represent objects on a page that are defined and generated from a provided dataset. Each data backed shape object includes a type that defines what object it is and how it will be parsed and must be linked to a set of data from which the objects will be generated.
These properties are used all data backed shapes. Additional configuration properties for data backed shape are listed with the description of the shape.
Property | Description |
---|---|
|
Identifier for a given data backed shape (must be unique). |
|
The type of data backed shape. An example for each data backed shape is list below. |
An Org Chart is a data backed shape that is used to represent the organizational structure of a group of people.
{
"id": "orgChart1",
"type": "orgChart",
"position": {
"x": 150,
"y": 150
},
"collectionId": "org-chart-data",
"idField": "Employee ID",
"foreignKeyField": "Supervisor ID",
"nameField": "Full Name",
"roleField": "Role",
"imageUrlField": "Image",
"extraFields": ["Email", "Cell Phone", "Building"]
}
Property | Description |
---|---|
|
The absolute point that the top left corner of the generated content will be placed. Note that the size of the object is dependent on the size and layout of the data provided |
|
The id of the provided collection that the org chart will draw data from. |
|
Defines the name of the field in the collection that represents the primary key or ID of the identities in the collection. Primary keys should be unique. |
|
Defines the name of the field in the collection that references the value of the |
|
Defines the name of the field that contains the name of the identity in the collection. |
|
Defines the name of the field that contains the role of the identity in the collection. If included, the role will be displayed on the org chart by default. |
|
Defines the name of the field that contains the URL pointing to an image of the identity in the collection. |
|
An array of names of other fields in the collection that should be included on the org chart. By default, these fields will not appear on the org chart directly but can be accessed in the data panel for the org chart to define if they should be displayed. |
The format to create a line on the Lucid document between two defined points.
{
"id": "line1",
"lineType": "elbow",
"endpoint1": {
"type": "shapeEndpoint",
"style": "none",
"shapeId": "block3",
"position": { "x": 1, "y": 1 }
},
"endpoint2": {
"type": "lineEndpoint",
"style": "arrow",
"lineId": "line2",
"position": 0.5
},
"stroke": {
"color": "#000000",
"width": 1,
"style": "solid"
},
"text": [
{
"text": "test",
"position": 0.5,
"side": "middle"
}
],
"customData": [
{
"key": "TestKey",
"value": "TestValue"
}
],
"linkedData": [
{
"collectionId": "network",
"key": "9"
}
]
}
Property | Description |
---|---|
|
Identifier for a given line (must be unique). |
|
Type that specifies how the line does, or does not, curve. |
|
The first of two endpoints that specifies how and where the line will end. |
|
The second of two endpoints that specifies how and where the line will end. |
|
Stroke object that defines the look of the line. |
|
An array of line text objects. Multiple text objects can be on the same line. |
|
An array of Custom Data objects. |
|
An array of Linked Data objects. |
Defines the styling of a line's curvature.
Value | Description | Image |
---|---|---|
|
A line with no curves. | |
|
A line with elbow (right-angle) curves. | |
|
A line with smooth curves. |
Defines where a line should end and the styling of the endpoint.
Property | Description |
---|---|
|
Type of endpoint to create. |
|
Style type which determines how the endpoint will appear |
The type of a given endpoint.
Value | Description |
---|---|
|
An endpoint that attaches to another line (see Line Endpoints for details). |
|
An endpoint that attaches to a shape (see Shape Endpoints for details). |
|
An endpoint that is positioned somewhere on the canvas independent of a shape or line (see Position Endpoints for details). |
An endpoint that attaches to another line.
{
"type": "lineEndpoint",
"style": "arrow",
"lineId": "line2",
"position": 0.5
}
Property | Description |
---|---|
|
Endpoint fields that are common to each type of endpoint (see Endpoints for details). |
|
The id for which line to attach the endpoint to. |
|
A relative position specifying where on the target line this endpoint should attach (must be between 0.0-1.0 inclusive). |
An endpoint that attaches to a shape.
{
"type": "shapeEndpoint",
"style": "none",
"shapeId": "block1",
"position": { "x": 1, "y": 0.5 }
}
Property | Description |
---|---|
|
Endpoint fields that are common to each type of endpoint (see Endpoints for details). |
|
The id for which shape to attach the endpoint to. |
|
A relative position specifying where on the target shape this endpoint should attach. |
An endpoint that is positioned somewhere on the canvas independent of a shape or line.
{
"type": "positionEndpoint",
"style": "arrow",
"position": { "x": 120, "y": -100 }
}
Property | Description |
---|---|
|
Endpoint fields that are common to each type of endpoint (see Endpoints for details). |
|
An absolute position specifying where on the canvas this endpoint should land. |
How to style the endpoint.
Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Defines what text should be displayed on the line and how it's styled.
{
"text": "test",
"position": 0.5,
"side": "middle"
}
Property | Description |
---|---|
|
The text to display on the line. |
|
A relative position specifying where on the target line this text should appear (must be between 0.0-1.0 inclusive). |
|
A type that specifies how the text should be displayed on the line |
The side of a line on which to position an object.
Value | Description |
---|---|
|
The top of the line. |
|
The middle of the line, with the line passing behind the object. |
|
The bottom of the line. |
Groups are collections of items, such as shapes, lines, or other groups. Groups cannot contain layers. Groups allow you to combine multiple items into a single, manageable unit. When you group items, you can move, resize, or format them collectively, treating the group as a single object. This is particularly useful when you want to maintain the relative positions of multiple items or when you want to apply formatting or actions to a set of items simultaneously.
{
"id": "group1",
"items": [ ... ],
"note": "Test Note",
"customData": [ ... ],
"linkedData": [ ... ]
}
Property | Description |
---|---|
|
Identifier for a given group (must be unique). |
|
An array of IDs of all Shapes, Lines, and Groups in the group. |
|
Text to add as a note to the group. |
|
An array of custom data in the group. See Custom Data for a description of its purpose. |
|
An array of linked data in the group. See Linked Data for a description of its purpose. |
Layers are collections of items, such as shapes, lines, or groups. Layers cannot contain other layers. They are similar to Groups but are more versatile. Layers are used to organize and manage the visual hierarchy of elements within a diagram. You can assign shapes, lines, and groups to different layers and then manipulate the visibility and order of those layers.
{
"id": "layer1",
"title": "New Layer",
"items": [ ... ],
"note": "Test Note",
"customData": [ ... ],
"linkedData": [ ... ]
}
Property | Description |
---|---|
|
Identifier for a given layer (must be unique). |
|
Title of the layer. |
|
An array of IDs of all Shapes, Lines, and Groups in the layer. |
|
Text to add as a note to the layer. |
|
An array of custom data in the layer. See Custom Data for a description of its purpose. |
|
An array of linked data in the layer. See Linked Data for a description of its purpose. |
import.lucid
├── images
│ ├── my-image.png
│ └── gifs
│ └── my-gif.gif
└── document.json
Images included in the images directory are uploaded to Lucid and available for referencing in the JSON.
Images are referenced without including directories. To use the file
...
"fill": {
"type": "image",
"ref": "my-gif.gif"
}
...
Extension | Description |
---|---|
|
Joint Photographic Experts Group |
|
Portable Network Graphics |
|
Graphics Interchange Format |
|
Windows Bitmap |
|
Tagged Image File Format |
import.lucid
├── data
│ ├── sales-performance.csv
│ └── templates
│ └── email-flow.csv
└── document.json
To import a data set from Google Sheets, Excel, or CSV with your document, include the CSV export of the file in the data directory.
To reference it from the JSON, refer to Linked Data and Collections.
Data files are referenced without including directories. To use the file
{
"id": "sales-performance",
"dataSource": "sales-performance.csv"
}
Property | Description |
---|---|
|
Identifier for a collection that linked data objects will reference. |
|
File reference. |
...
"collections": [
{
"id": "sales-performance",
"dataSource": "sales-performance.csv"
},
{
"id": "email-flow",
"dataSource": "email-flow.csv"
}
]
...
"linkedData": [
{
"collectionId": "email-flow",
"key": 1
}
]
...
Extension | Description |
---|---|
|
Text file |
|
Comma-Separated Values |
import.lucid
└── folder
├── document.json
└── data
└── email-flow.csv
import.lucid
├── document.json
└── data
└── email-flow.csv
Error Code | Error Message | Possible Solution |
---|---|---|
invalid_file | Standard import file entry does not exist | This error commonly occurs when the parent folder containing the standard import files/folders ( |
invalid_file | error.expected.validenumvalue | This error commonly occurs when an invalid enum value is used on fields such as Stroke.style, Line.lineType, Line.text.side, Style.fill.type, and Style.fill.imageScale. |
invalid_file | error.expected.jsnumber | This error commonly occurs when a number is expected during JSON parsing, but something else is found instead. For example, this can happen when using the position property of the line endpoint object. For a shapeEndpoint, the position property expects a RelativePosition object. However, a lineEndpoint just expects a number for the position property. When an object is used instead of a number, this error is thrown. |
curl 'https://api.lucid.co/documents'\
--request 'POST'\
--header 'Authorization: Bearer <OAuth 2.0 Access Token>'\
--header 'Lucid-Api-Version: 1'\
--form 'file=@<location>/import.lucid;type=x-application/vnd.lucid.standardImport'\
--form 'title=New Document'\
--form 'product=lucidchart'\
--form 'parent=1234'
Response Code | Error Message | Possible Solution |
---|---|---|
415: Unsupported Media Type | invalidImportType: Importing the provided file type is not supported | This error commonly occurs when the |
400: Bad Request | badRequest: You must set the product field to either 'lucidchart' or 'lucidspark' when using the Lucid Standard Import | If the product field is correctly being set in your request (as explained in the Overview), then this error commonly happens when the data is not being sent as form data. This causes the request to fail even if all the data independently is correct. Refer to the Import Document endpoint or to the code to the right for an example in cURL of how to send the request data as form data. Additionally, you may refer to the documentation for your specific API platform, such as Postman. |