Update Mermaid Diagram

Replaces the markup of an existing Mermaid diagram in a document.

Creating, retrieving, listing, and updating Mermaid diagrams in existing documents share a per-account rate limit.

Supply expectedMarkup from the diagram's last read to make this a conditional update.
The comparison is exact, including whitespace and line endings. A mismatch or a concurrent
document save returns 409 without applying the update. Fetch the diagram again and obtain
a new decision before retrying. Omitting expectedMarkup retains unconditional replacement.

Valid Authentication Methods

API Key Grants:

  • DocumentEdit

OAuth 2.0 User Token Scopes:

  • lucidchart.document.content
  • lucidspark.document.content
  • lucid.document.content
Path Params
uuid
required

ID of the document containing the Mermaid diagram.

string
required

ID of the Mermaid diagram to update.

Body Params
string
required
length ≤ 100000

Mermaid markup that replaces the diagram's existing markup.

string
length ≤ 100000

Exact previously read markup, including whitespace and line endings. When supplied, the update is rejected with 409 if the current markup differs. Omit for an unconditional replacement.

Responses

400

Bad Request if the request body is invalid or the markup exceeds 100,000 characters.

403

Forbidden if the app making the request does not have write permission to the document, or if the document does not exist.

404

Not Found if the Mermaid diagram does not exist.

409

Conflict if expectedMarkup does not match the current markup or a document change prevents the update from being saved. The update is not applied.

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*