Sequencemono
Async Job with Polling
A sequence diagram of an async job: the client starts a job, gets an id, and polls status until the worker finishes.
Start from this template
Opens in the editor. No signup. Export SVG, PNG, or an embed link.
Source text
title: Async Job with Polling
theme: mono
type: sequence
participant client "Client"
participant api "API"
participant worker "Worker"
client -> api : "POST /jobs"
api --> client : "202 + job id"
api -> worker : "start job"
client -> api : "GET /jobs/id"
api --> client : "running"
worker --> api : "done"
client -> api : "GET /jobs/id"
api --> client : "done + result"About this template
A sequence diagram of an async job with polling. The client starts a job and gets 202 Accepted with a job id. The API hands the work to a worker, and the client polls GET /jobs/id until the status changes from "running" to "done" with a result.
Use it to document long-running API operations such as exports, video processing, or AI tasks, where holding the request open would time out.
If your API pushes results instead of being polled, replace the second GET with a webhook or server-sent event message from the API to the client.