Live updates
Server-Sent Events for issues, stats, connections, runs, approvals, root causes and fixes.
The stream sends changes in your organization as Server-Sent Events, so the app updates without polling. One stream covers one organization and one mode.
Open the stream#
/api/v1/orgs/{org_id}/streamOpens a text/event-stream connection. The first event is ready; a heartbeat comment follows every 15 seconds. Each event has an event: name, data: JSON and an id:. The server asks clients to reconnect after 3 seconds if the connection drops.
Auth: session only. Secret keys get 403 api_key_not_allowed. The role needs issues.view.
EventSource can't send headers, so the mode comes from ?mode=. When the Mendloop-Mode header is sent, it wins. Test mode needs mode.switch_test.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id |
uuid | required | Organization id |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mode |
string | optional | live (default) or test |
Response
text/event-stream. See the event types below.
Errors
| Status | Code | When |
|---|---|---|
| 403 | test_mode_not_allowed |
Your role can't use test mode |
curl -N "https://app.getmendloop.com/api/v1/orgs/ORG_ID/stream?mode=live" \
--cookie "ml_session=…"// In the web app's origin, signed in. EventSource sends the session cookie.
const stream = new EventSource(`/api/v1/orgs/${orgId}/stream?mode=live`, { withCredentials: true });
stream.addEventListener("ready", (e) => console.log("connected", JSON.parse(e.data)));
stream.addEventListener("issue.created", (e) => {
const { issue } = JSON.parse(e.data);
console.log("new issue", issue.short_id, issue.title);
});
stream.addEventListener("stats.updated", (e) => render(JSON.parse(e.data)));import json
import requests
with requests.get(
"https://app.getmendloop.com/api/v1/orgs/ORG_ID/stream",
params={"mode": "live"},
cookies={"ml_session": "…"},
stream=True,
timeout=(10, None),
) as resp:
resp.raise_for_status()
event = None
for line in resp.iter_lines(decode_unicode=True):
if line.startswith("event:"):
event = line[6:].strip()
elif line.startswith("data:"):
print(event, json.loads(line[5:]))event: ready
data: {"org_id": "0193a2c4-5e1f-7b20-8c4d-2f6a9e1b3c70", "mode": "live"}
retry: 3000
event: issue.event
data: {"issue_id": "0193b7e2-0a4c-7f19-b8d2-51c3e9a7f604", "project_id": "0193a2c4-61b0-7d3e-9a15-7c2e4f8b1d02", "event_count": 4211, "user_count": 612, "last_seen": "2026-11-05T09:14:05Z"}
id: 5f1c2a9e0b3d
: pingEvent types#
| Event | data |
Notes |
|---|---|---|
ready |
{org_id, mode} |
First event on every connection |
issue.created |
{issue} |
A new issue |
issue.regressed |
{issue} |
A resolved issue came back in a newer release |
issue.updated |
{issue} |
Status, assignee, severity, owner or counts changed; also sent for spikes |
issue.event |
{issue_id, project_id, event_count, user_count, last_seen} |
New events; at most once per second per issue, and the last update is always sent |
stats.updated |
Same shape as Get issue stats | At most every 15 seconds by default (MENDLOOP_STATS_INTERVAL_SECONDS) |
connection.updated |
{connection} |
Status or health changed |
verify.progress |
{connection_id, run_id, check} |
One verify check changed |
run.updated |
{run} |
A workflow run changed |
step.updated |
{run_id, step} |
A step changed |
approval.requested |
{request} |
A new approval request |
approval.decided |
{request} |
A decision was recorded |
rca.updated |
{report_id, status, issue_id, version} |
A root cause analysis changed |
fix.updated |
{fix_run_id, issue_id, workflow_run_id, status, progress, error, outcome, outcome_at, outcome_reason} |
A fix run changed |
pull_request.updated |
{pull_request, issue_id} |
A Mendloop pull request changed |
ticket.created, ticket.updated |
{ticket, issue_id} |
A ticket was created or changed |
notification.created |
{user_id, id} |
A new in-app notification for that user |
Issue events are filtered to the projects you can see. Ignore event names you don't know; new ones may be added.