Skip to main content
Question

Create Lucid Docs via Mermaid & REST API

  • April 2, 2026
  • 1 reply
  • 68 views

Forum|alt.badge.img

Hello, i want to create a document, creating a “Diagram as a Code” with Mermaid on Lucid through a REST API.

From the Documentation, i only see that in order to create a document, i need to send the following body:

{
  "product": "lucidchart",
  "title": "example",
  "parent": 123
}

but how do I send the actual contents of the diagram?

sequenceDiagram

Alice->>John: Hello John, how are you?

John-->>Alice: Great!

Alice-)John: See you later!

I read also that there is an alternative way of sending the information, but the documentation and examples on https://developer.lucid.co/reference/createorcopyorimportdocument are not clear to me.

Thank you!

 

Comments

Forum|alt.badge.img+4
  • Lucid support team
  • May 14, 2026

Hi ​@Andres H,

 

Thank you for reaching out and sorry for the delay in response here, looks like this post slipped through the cracks.  Currently, creating or updating a diagram’s content (like Mermaid code) directly via the standard REST API documents endpoint is not supported. I have shared your interest with our product team.

To accomplish 'Diagram as Code' workflows using Mermaid or other formats, the recommended approach is to use MCP. MCP allows you to define diagram structures programmatically. You can find further documentation here.

Let us know if you have any other questions!