Elements
A page element is anything that appears on a page — a text block, an image, a shape, a table, a group. All elements share a common set of baseline properties (identity, geometry, fill, stroke, shadow, opacity, blend mode). The type field on every element determines which additional, type-specific fields are present.
Element Types
There are 10 element types:
type | Description |
|---|---|
group | A container grouping other elements |
circle | Circle / ellipse |
roundedrect | Rectangle with optional corner radius |
triangle | Triangle |
line | Line segment |
image | Raster image |
table | Tabular layout |
rich | Rich-text block with inline formatting |
path | Arbitrary SVG-style path |
poly | Polygon |
circelOlder documents may carry the misspelled circel as their circle type. The validator still accepts this value on input for backward compatibility, but new documents should emit circle.
Shared Properties
Every element carries this baseline (abbreviated list):
Identity & Naming
id(numeric, unique in page),uuid(UUID),name
Geometry
nativeRect— authoritative boundsscreenRect,screenSavedRect— editor display rectsangle— rotationrotationCx,rotationCy— rotation centerhandles,rotatedHandles— resize/rotate handles
Fill, Stroke & Gradient
Elements reference swatches the same way pages do:
fillSwatchUuid,fillTintValue— solid fillstrokeSwatchUuid,strokeTintValue,nativeBorderSize,strokeDash— bordernativeGradientFillStart,nativeGradientFillLength,gradientFillAngle— gradient fill- Matching
...Stroke...fields for gradient strokes
Shadows
shadow(bool),shadowSwatchUuid,shadowAnglenativeShadowLength,nativeShadowOffsetX,nativeShadowOffsetY,nativeShadowBlur
Blend & Opacity
opacity(0–1)blendMode— one of 26 blend modes (see below)
Behavior & State
locked,hidden,selected,highlightedautoLayout— auto-layout container configuration (for groups that behave as layouts)autoSize— auto-resizing ruleslayerInfo,editOptions— editor-only metadata
Blend Modes
The blendMode field accepts 26 values mirroring the canvas compositing operations:
color, color-burn, color-dodge, copy, darken, destination-atop, destination-in,
destination-out, destination-over, difference, exclusion, hard-light, hue, lighten,
lighter, luminosity, multiply, overlay, saturation, screen, soft-light,
source-atop, source-in, source-out, source-over, xor
Any other value is rejected by the validator.
Type-Specific Fields
Each subclass adds its own fields — for example:
imageelements hold an image URL/reference plus crop, scale, and color-correction fieldsrichelements hold formatted text runs, font settings (fontName,fontSize,fontStyle,defaultFont), and inlineTagmarkuptableelements hold row/column structure and per-cell style
For the exact field set of each element type, send a sample payload to POST /v1/document/validate — the returned violations pinpoint any missing or misnamed fields.