Diagramly

Templates

State machine diagram template

The lifecycle of a request as four states: idle, fetching, success and error. Arrows show what moves it from one to the next, with a self-loop and two-way transitions where a state can go back.

Good for

  • Modelling UI or request state before writing the code
  • Documenting a workflow with a fixed set of states
  • Explaining retries and error handling

How to use it

  1. Press Use this template. It opens on the canvas in your browser, free, with no sign-up.
  2. Double-click any shape to rename it, or press / and type a line such as Client -> API -> DB to add to it.
  3. Share it as a link, present it with Shift+P, or export PNG, SVG or PDF.

In this diagram

  • Idle
  • Fetching
  • Success
  • Error
  • fetch
  • poll
  • 200 OK
  • 5xx
  • retry
  • backoff
  • reset

More templates