The Document Content resource is returned by the Get Document Contents endpoint. It provides a structured representation of everything inside a document: its pages, the shapes and lines on each page, groups, layers, text, custom data, and any linked dataset records.
DocumentContent
The root response object.
| Field | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | Unique identifier of the document |
title | String | Yes | Title of the document |
product | Product | Yes | The Lucid product the document belongs to |
pages | Page[] | Yes | An array of Page resources in the document |
accountId | Integer | Yes | ID of the Lucid account that owns the document |
data | Data | Yes | Data contained in the document |
Example
{
"id": "8e7b19ec-27ff-40e3-beb8-03f51b1661b2",
"title": "document title",
"product": "lucidchart",
"accountId": 1234,
"pages": [],
"data": {
"collections": []
}
}Product
A string enum identifying which Lucid product the document belongs to.
Possible values: lucidchart, lucidscale, lucidspark
Page
A single page within the document.
| Field | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Page ID |
title | String | Yes | Title of the page |
index | Integer | Yes | 0-based index of the page in the document |
items | Items | Yes | Shapes, lines, groups, and layers on the page |
customData | DataPair[] | Yes | Array of Data Pair resources linked to the page |
linkedData | LinkedData[] | Yes | Array of Linked Data resources linked to the page |
Example
{
"id": "YGcM5DNywbTK",
"title": "document page title",
"index": 0,
"items": {
"shapes": [],
"lines": [],
"groups": [],
"layers": []
},
"customData": [],
"linkedData": []
}Items
The collection of all drawable items on a page. Item IDs are unique across shapes, lines, and groups within a document.
Shape
A shape placed on a page. A shape's id is unique across all shapes, lines, and groups in the document.
| Field | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Unique shape ID |
class | String | Yes | A unique string representing the type of shape (e.g., ProcessBlock) |
textAreas | TextArea[] | Yes | Text areas on the shape |
customData | DataPair[] | Yes | Custom data key-value pairs linked to the shape |
linkedData | LinkedData[] | Yes | Linked data resources linked to the shape |
contains | Contains | No | If the shape is a container (e.g., a frame), lists the IDs of items within it |
Line
A line connecting shapes on a page. A line's id is unique across all shapes, lines, and groups in the document.
| Field | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Unique line ID |
endpoint1 | Endpoint | Yes | The first endpoint of the line |
endpoint2 | Endpoint | Yes | The second endpoint of the line |
textAreas | TextArea[] | Yes | Text areas on the line |
customData | DataPair[] | Yes | Custom data key-value pairs linked to the line |
linkedData | LinkedData[] | Yes | Linked data resources linked to the line |
Group
A named grouping of shapes, lines, and other groups on a page. A group's id is unique across all shapes, lines, and groups in the document.
| Field | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Unique group ID |
members | String[] | Yes | IDs of the shapes, lines, and groups contained within this group |
customData | DataPair[] | No | Custom data key-value pairs linked to the group |
linkedData | LinkedData[] | No | Linked data resources linked to the group |
Layer
A layer organizes items on a page. Layers can be shown or hidden in the Lucid editor.
| Field | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Unique layer ID |
name | String | Yes | Display name of the layer (e.g., Layer 1) |
members | String[] | Yes | IDs of the shapes, lines, and groups assigned to this layer |
customData | DataPair[] | Yes | Custom data key-value pairs linked to the layer |
linkedData | LinkedData[] | Yes | Linked data resources linked to the layer |
Endpoint
One end of a line.
| Field | Type | Required | Description |
|---|---|---|---|
style | String | Yes | Arrowhead or endpoint style (e.g., Arrow) |
connectedTo | String | null | Yes | ID of the shape or line this endpoint connects to, or null if unconnected |
TextArea
A labeled block of text on a shape or line. Text is returned as plain text — all formatting has been stripped and any formulas have been evaluated.
| Field | Type | Required | Description |
|---|---|---|---|
label | String | Yes | Identifies which text area on the shape this is (e.g., Text) |
text | String | Yes | Text displayed in the text area. This is plain text. All formatting has been removed & formulas evaluated. |
Contains
Lists the IDs of items nested inside a container shape (e.g., a frame).
| Field | Type | Required | Description |
|---|---|---|---|
shapes | String[] | Yes | IDs of shapes within the container |
lines | String[] | Yes | IDs of lines within the container |
groups | String[] | Yes | IDs of groups within the container |
Data
The structured data embedded on the document, organized into collections.
| Field | Type | Required | Description |
|---|---|---|---|
collections | Collection[] | Yes | Data collections on the document |
Collection
A collection is a container for structured data within a document — analogous to a tab or individual sheet in a spreadsheet. A collection belongs to exactly one data source.
| Field | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Unique identifier of the collection |
name | String | Yes | Display name of the collection (e.g., Collection 1) |
primaryKey | String[] | Yes | The primary key column name(s) for records in this collection |
DataPair
A key-value pair of custom data. Custom data can be attached to pages, shapes, lines, groups, and layers.
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Custom data key |
value | String | Yes | Custom data value |
Example
{
"name": "City",
"value": "New York"
}LinkedData
Data from a document collection that has been linked to a specific page, shape, line, group, or layer.
| Field | Type | Required | Description |
|---|---|---|---|
collection_id | String | No | ID of the collection this data comes from |
data | DataPair[] | Yes | Key-value field data for this linked record |
primaryKeyValue | String | Yes | The primary key value identifying this record within the collection |