Skip to main content
POST
Create or update a diagram

Authorizations

X-API-Key
string
header
required

Headers

customer
string
required

Workspace identifier

Path Parameters

projectId
string
required

Body

application/json
name
string
required

Diagram title

annotations
object[]

Freestanding text annotations (titles, section labels)

branchId
string

Branch to write to. Omit or pass "master" for the base branch.

connections
object[]

Directed arrows between entity/node IDs

entities
object[]

Flow platform entities to render as data-shape cards (entity relationship diagrams). For generic shapes use nodes instead.

hostEntityId
string

Entity to link the diagram to. The diagram appears in this entity's Diagrams section, and rich-text embeds ({"type": "tldraw", ...} nodes) only resolve diagrams linked to the entity that owns the field — pass this whenever the diagram should be visible from an existing entity.

id
string

Diagram entity ID (UUID). Auto-generated if omitted. If an existing diagram entity has this ID, its name and snapshot are replaced (upsert); if a non-diagram entity has this ID the request fails with 409.

nodes
object[]

Standalone geometric nodes not backed by Flow entities (state machines, flowcharts). Provide x/y on every node for a controlled layout.

snapshot
object

Pre-built tldraw snapshot to persist verbatim — exactly the snapshot object returned by POST /convert/drawio-to-tldraw. Mutually exclusive with entities/nodes/connections/annotations.

Response

201 - application/json
formulaTemplates
object
required
formulas
object
required
id
string
required
values
object
required
branchesChangedIn
string[]
branchesCreatedIn
string[]
createdAt
string<date-time>
defaultSortKey
string
deleted
boolean
type
string
uniqueEntityNumber
number
updatedAt
string<date-time>