---
title: "Every record version, as Server-Sent Events"
method: GET
path: "/api/network/changes/stream"
---

# Every record version, as Server-Sent Events

`GET /api/network/changes/stream`

## Request

- Base URL: `https://trooth.co`
- URL: `https://trooth.co/api/network/changes/stream`
- Auth: none required

The change feed as a text/event-stream (WHATWG Server-Sent Events). Each event is event: record.version, with the same JSON an entry of GET /api/network/changes carries and id set to its cursor, so a client that reconnects with Last-Event-ID (every EventSource does) resumes exactly after the last event it received. Without Last-Event-ID or after, the stream starts now. A connection is held for about 50 seconds and closed with a comment; the client reconnects (retry: 3000). A comment is sent every 15 seconds on a quiet stream. Errors before the stream opens are RFC 9457 problem details. Readable cross-origin: the response carries Access-Control-Allow-Origin: * and never Access-Control-Allow-Credentials, so a browser on any site may read it without cookies.

## Query parameters

- `after` string

## Headers

- `Last-Event-ID` string

## Response `200`

An event stream of record.version events.

## Other responses

- `400`: A position that cannot be read.
- `410`: The position is older than the feed keeps.
- `429`: Rate limited.
- `503`: The feed could not be read, or history is not set up.

---

[API](https://skmtc.dev/trooth/apis/trooth-public-api.md) · [All operations](https://skmtc.dev/trooth/apis/trooth-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trooth/apis/trooth-public-api/revisions/e4d4e92641d9?raw)
