Sequence diagram examples

UML sequence diagram examples from a description

UML sequence diagram examples — lifelines, messages, and returns — generated from plain English. Great for APIs and auth flows. Free to try.

Open the studio → Learn more Free — 3 diagrams, no account

Prose in. Diagram out.

The prompt

The user logs in via the web app, which requests a token from the auth service. The auth service validates credentials against the database and returns a JWT.

Try this in the studio →

ChartCraft draws

Sequence diagram example: OAuth login flowUserWeb AppAuth ServiceDatabaselog inrequest tokenvalidate credentialsokJWTlogged in

More sequence diagram examples

Generated with ChartCraft and published in the examples gallery — open one to see its prompt, or use it as a starting point.

The notation, in 30 seconds

Participants across the top, time flowing down, arrows for messages — the whole notation in five marks.

ElementWhat it means
Participant / actorA column in the conversation: user, service, database. Order them left-to-right by first involvement.
Lifeline (dashed vertical)The participant's existence through time — messages attach to it.
Synchronous message (solid arrow)A call that waits for an answer: POST /login, verifyPIN().
Return (dashed arrow)The reply flowing back: 200 OK, approval. Draw the ones that carry meaning.
Self-messageA participant doing internal work — validate, compute, retry.
Alt / opt fragmentsBoxed regions for branches: the failure path, the optional step.

Best practices — and the classic mistakes

Do

  • Seven participants is the readability ceiling; merge minor ones (“Notifications”) or split the diagram.
  • Name messages as the caller sees them: POST /orders, chargeCard(amount) — not internal function soup.
  • Keep one scenario per diagram: “checkout, card declined” is a different diagram from “checkout, success” unless an alt fragment stays small.
  • Let time read strictly downward — no arrows that jump back up.
  • Start the diagram with the external trigger, not system internals.

Avoid

  • Missing returns on calls whose replies drive the logic — the reader can't tell what was decided.
  • Mixing abstraction levels: user clicks next to TCP handshakes.
  • A dozen participants in one diagram — nobody can follow the arrows.
  • Modelling state changes (“order becomes Paid”) — that story belongs in a state diagram.

Questions

How were these sequence diagram examples made?

Each example was generated by ChartCraft from a plain-English prompt, then laid out automatically — the same way you'd make your own. Click any example to see its full page.

Can I use these sequence diagram examples as templates?

Yes — open an example, copy its prompt into the studio, then edit it in plain English to fit your case.

When should I use a sequence diagram instead of a flowchart?

When the interesting question is who talks to whom — API flows, auth handshakes, service interactions. If the question is what steps happen, a flowchart tells it better.

How do I show error handling?

With an alt fragment: the top region holds the success branch, the bottom the failure (payment declined, token expired). If the failure path grows large, give it its own diagram.

Is it free?

Your first 3 diagrams are free with no account, then 5 a month on a free account.

Related

Try it now — your first three are free.

Open the studio →