← Back to editor

Editable Sequence diagram example

API request Mermaid diagram example

Updated · Renders with Mermaid 11.17.2

Edit this API request lifecycle in Mermaid, inspect the rendered result, and adapt the working source for your own documentation.

About this example

This API request lifecycle example is designed as an editable starting point rather than a finished specification. In the rendered diagram, the client, API, and database exchange messages in chronological order. Read the structure once before changing the source so identifiers, labels, and connections stay aligned. The example is intentionally small enough to test after every edit, but it includes the syntax needed to communicate the central relationship. Open it in mermaid.tools, make one change at a time, and keep the Mermaid source alongside exported images so the diagram remains maintainable.

Mermaid source

sequenceDiagram
  participant C as Client
  participant A as API
  participant D as Database
  C->>A: GET /orders
  A->>D: Find orders
  D-->>A: Results
  A-->>C: 200 OK
Open in editorDownload .mmd

Adapt it

This example source is dedicated to the public domain under CC0 1.0. Review generated diagrams before relying on them in documentation.

Learn more in the related guide.

Related examples

Team org chart

Edit this small team reporting structure in Mermaid, inspect the rendered result, and adapt the working source for your own documentation.

Order data model

Edit this order data model in Mermaid, inspect the rendered result, and adapt the working source for your own documentation.

Release plan

Edit this dependent release schedule in Mermaid, inspect the rendered result, and adapt the working source for your own documentation.