How to draw a sequence diagram

A sequence diagram shows the messages between participants in time order, top to bottom. Draw one for how a request travels through a system, or any conversation where order matters.

A sequence diagram with User, App and Server: User asks App to sign in, App sends POST /login to Server, Server replies with a session token, App replies with the home page. A sequence diagram with User, App and Server: User asks App to sign in, App sends POST /login to Server, Server replies with a session token, App replies with the home page.
Signing in: calls left to right, dashed replies back, activation bars drawn by the app.

Step by step

  1. Pick Sequence from the Diagram menu and choose New sequence. Name the first participant, then press Tab for each next one.

    Three participants side by side: User, App and Server. Three participants side by side: User, App and Server.
  2. Select a participant ([ and ] move between them) and click Message →: a message to its neighbour, ready for its label. Enter adds the next message.

    Two messages: Sign in from User to App, and POST /login from App to Server, with activation bars. Two messages: Sign in from User to App, and POST /login from App to Server, with activation bars.
  3. Click Reply ← for an answer going back. Select messages and add a Loop frame or Alt frame around them, then type its condition.

    A dashed reply, Session token, from Server to App, inside a frame titled “loop until it works”. A dashed reply, Session token, from Server to App, inside a frame titled “loop until it works”.

Tips

Mermaid

Paste this onto the board, or use Board menu → Import Mermaid…; Export Mermaid… writes a board back as text.

sequenceDiagram
  participant U as User
  U->>App: Sign in
  loop until it works
    App->>Server: POST /login
    Server-->>App: Session token
  end
  App-->>U: Home page

->> is a call, -->> a reply, -) an async message. Note over adds a note. loop, alt, opt, par, critical and break blocks become frames. More on Mermaid import and export.