Hi,
We’re building an automation using n8n where an AI agent generates a flowchart spec and then creates a Lucidchart diagram automatically.
We’re already successfully using the Documents API with an API key to call:POST https://api.lucid.co/v1/documents
to create a new Lucid document.
What we’re missing is a supported API for editing document contents – specifically, creating shapes and connectors on a page programmatically.
Could you please clarify:
- Is there a supported, documented API (REST or otherwise) that allows us to:
- Create shapes (e.g., rectangles)
- Create connectors between shapes
- Set text labels and basic style
in a Lucidchart (or Lucidspark) document?
- If yes:
- What is the endpoint URL and HTTP method?
- What auth mechanism is required (API key vs OAuth 2.0), and which scopes or grants?
- Could you provide the smallest working example request that, for our account,
creates a single rectangle and a single connector in a document we own?
- If not available via REST, is the recommended approach to use the Lucid Extension SDK instead (e.g., an extension that runs in the editor and draws shapes based on data)?
- If so, is there a best‑practice pattern for sending external data (like our AI‑generated diagram spec) into an extension so it can construct the diagram?
We’re currently getting a 401 when attempting to PATCH document content endpoints we’ve inferred, which suggests those endpoints aren’t available with our current key/plan.
Any pointers to the right product/API surface (Documents API vs Data API vs Extension SDK) and a concrete example call would be very helpful.
Yes, we are aware that Lucid has a ChatGPT AI option
Thanks!
Stephen