Skip to main content

I have a diagram that uses the new mermaid sequence diagram as code feature. The issue I’m having is I’d like to store the mermaid code in my git repository and post it to Lucid through automation. Is there an existing API for this?

Hi @Ed Langley , thanks for your question! Unfortunately we don’t currently have any specific APIs designed to integrate directly with the Mermaid / Diagram-as-code generator.

We do have a REST API endpoint for programmatically generating new documents with shapes, lines etc: our Lucid Standard Import, which you can read more about in our docs here or in this community post: New JSON Standard Import API. However, this requires a specifically formatted JSON, so you couldn’t use this endpoint to directly create a new diagram from Mermaid code. 

If you’d like to see an API endpoint designed to work with Mermaid code, please consider adding this as an idea in our Product Feedback Community space. This shares the feature request directly with our product team and gives others the option to upvote your idea. For details on how feedback submissions are collected and considered, check out this community post.


I’ve same problem here, would be great to see something like this comming


Hi ​@tobi, thanks for contributing to this post!  🙌🏼  Would you mind sharing more details about your specific use case? 

I’ve went ahead and converted this post to an idea so that it’s visible to others within the Product Feedback section of the community - from here, they can upvote it and add details of their own.

We encourage anyone else who’s interested in this to upvote this post and share what you’d like to see in this experience. For more information about how we manage feedback in the community, please take a look at this post.


Thanks ​@Ambar D - very much appreciated. Well, in engineering we usually design diagrams with Mermaid.js. Those are put on VCS, are under code review and further processed by other tools like linter or documentation builder. Unfortunately those artefacts are hard to access/discover by business. 

Here comes Lucid! Lucid if for us a great tool at the intersection of business and engineering. It allows us communication and alignment among both areas. 

Now, with your new Mermaid-in-Code feature, you enabled us to add those mermaid.js artefacts next to business content to create a holistic overview.

Only problem is, that those mermaid diagrams change overtime, and as the import is manual, we can’t ensure the content remains up-to-date in Lucid. So this leads to inconsistency and questions of those holistic overviews… Hence, we’re very much appreciate if you’d allow us to programatically update those mermaid diagrams on change in VCS. 

Hope this helps, feel free to ask more details - Thanks!


Hi ​@tobi, thanks for this context and for providing more details! I certainly understand that is important to you and understand how it impacts your work. Your feedback is important to us, so thank you for taking the time to thoughtfully share your experience.

For others who may come across this post - we encourage anyone else who’s interested in this to upvote this post and share what you’d like to see in this experience. For more information about how we manage feedback in the community, please take a look at this post!