Document Contents Resource

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.

FieldTypeRequiredDescription
idUUIDYesUnique identifier of the document
titleStringYesTitle of the document
productProductYesThe Lucid product the document belongs to
pagesPage[]YesAn array of Page resources in the document
accountIdIntegerYesID of the Lucid account that owns the document
dataDataYesData 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.

FieldTypeRequiredDescription
idStringYesPage ID
titleStringYesTitle of the page
indexIntegerYes0-based index of the page in the document
itemsItemsYesShapes, lines, groups, and layers on the page
customDataDataPair[]YesArray of Data Pair resources linked to the page
linkedDataLinkedData[]YesArray 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.

FieldTypeRequiredDescription
shapesShape[]YesShapes on the page
linesLine[]YesLines on the page
groupsGroup[]YesGroups on the page
layersLayer[]YesLayers on the page

Shape

A shape placed on a page. A shape's id is unique across all shapes, lines, and groups in the document.

FieldTypeRequiredDescription
idStringYesUnique shape ID
classStringYesA unique string representing the type of shape (e.g., ProcessBlock)
textAreasTextArea[]YesText areas on the shape
customDataDataPair[]YesCustom data key-value pairs linked to the shape
linkedDataLinkedData[]YesLinked data resources linked to the shape
containsContainsNoIf 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.

FieldTypeRequiredDescription
idStringYesUnique line ID
endpoint1EndpointYesThe first endpoint of the line
endpoint2EndpointYesThe second endpoint of the line
textAreasTextArea[]YesText areas on the line
customDataDataPair[]YesCustom data key-value pairs linked to the line
linkedDataLinkedData[]YesLinked 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.

FieldTypeRequiredDescription
idStringYesUnique group ID
membersString[]YesIDs of the shapes, lines, and groups contained within this group
customDataDataPair[]NoCustom data key-value pairs linked to the group
linkedDataLinkedData[]NoLinked data resources linked to the group

Layer

A layer organizes items on a page. Layers can be shown or hidden in the Lucid editor.

FieldTypeRequiredDescription
idStringYesUnique layer ID
nameStringYesDisplay name of the layer (e.g., Layer 1)
membersString[]YesIDs of the shapes, lines, and groups assigned to this layer
customDataDataPair[]YesCustom data key-value pairs linked to the layer
linkedDataLinkedData[]YesLinked data resources linked to the layer

Endpoint

One end of a line.

FieldTypeRequiredDescription
styleStringYesArrowhead or endpoint style (e.g., Arrow)
connectedToString | nullYesID 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.

FieldTypeRequiredDescription
labelStringYesIdentifies which text area on the shape this is (e.g., Text)
textStringYesText 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).

FieldTypeRequiredDescription
shapesString[]YesIDs of shapes within the container
linesString[]YesIDs of lines within the container
groupsString[]YesIDs of groups within the container

Data

The structured data embedded on the document, organized into collections.

FieldTypeRequiredDescription
collectionsCollection[]YesData 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.

FieldTypeRequiredDescription
idStringYesUnique identifier of the collection
nameStringYesDisplay name of the collection (e.g., Collection 1)
primaryKeyString[]YesThe 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.

FieldTypeRequiredDescription
nameStringYesCustom data key
valueStringYesCustom 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.

FieldTypeRequiredDescription
collection_idStringNoID of the collection this data comes from
dataDataPair[]YesKey-value field data for this linked record
primaryKeyValueStringYesThe primary key value identifying this record within the collection