UML Sequence Diagram

    Behavioral

    A behavioral UML diagram that shows how objects exchange messages over time.

    Overview

    Sequence diagrams show object interactions in a scenario. Lifelines run top to bottom. Arrows are messages. Use them for APIs, checkout flows, and service calls. This gallery page is an example plus a short how-to in UML Diagram Studio. For a long tutorial, read the sequence diagram blog post.

    Keywords
    Lifelines
    Messages
    Activation
    Actors
    Return
    Async
    Components
    Key elements that make up this diagram type

    Actor

    A user or external system that starts the interaction.

    Lifeline

    A vertical line showing an object or participant over time.

    Message

    A call, signal, or return between lifelines.

    Activation

    A bar on a lifeline showing when that object is busy.

    Alt / Loop

    Combined fragments for conditions and repetition.

    Where It's Used
    Common applications and scenarios for this diagram
    • API design reviews
    • Onboarding new engineers to a flow
    • Debugging multi-service bugs
    • Documenting auth and payment
    Use Cases & Industries

    Use Cases:

    API request and response flows
    Microservice collaboration
    Authentication sequences
    Checkout and payment flows

    Industries:

    Software Development
    Web Development
    Enterprise Applications
    E-commerce Platforms
    How to Create with UML Diagram Studio
    Step-by-step guide to create this diagram in our studio
    1

    Open the free UML diagram tool

    Go to the homepage editor. No install is required.

    2

    Declare participants

    Use actor and participant aliases so names stay short.

    @startuml
    actor Customer
    participant "Order Service" as Order
    participant "Payment" as Pay
    @enduml
    3

    Add messages

    Solid arrows are calls. Dashed arrows are returns.

    Customer -> Order: Place order
    Order -> Pay: Charge card
    Pay --> Order: OK
    Order --> Customer: Confirmation
    4

    Preview and export

    Watch the live preview, then export PNG or SVG.

    Complete Example Code
    Full PlantUML code example you can use in the studio
    @startuml
    actor Customer
    participant "Order Service" as Order
    participant "Payment Service" as Pay
    participant "Inventory" as Stock
    
    Customer -> Order: Create order
    activate Order
    Order -> Stock: Check stock
    Stock --> Order: Available
    Order -> Pay: Charge
    Pay --> Order: Success
    Order --> Customer: Confirmed
    deactivate Order
    @enduml
    Best Practices
    • One scenario per diagram
    • Name participants as real services
    • Show failures when they matter
    • Avoid drawing the entire system in one sequence
    Related Tutorials
    Learn more about sequence diagrams with our guides
    Related Diagrams
    Other diagram types you might find useful
    Class Diagram - static structure of the same objects
    Activity Diagram - overall process without message timing
    Use Case Diagram - which actors trigger the scenario