AsyncAPI 2.6 description of the Apache CouchDB database `_changes` feed. CouchDB exposes a per-database, append-only stream of document mutations at `GET /{db}/_changes` (and `POST /{db}/_changes` for `_doc_ids` / `_selector` filters with large payloads). The endpoint supports four `feed` modes: - `normal` — one-shot JSON response of past changes. - `longpoll` — request blocks until at least one change is available, then returns a single JSON envelope identical to `normal`. - `continuous` — long-lived HTTP response; one JSON change row per line. - `eventsource` — long-lived HTTP response in Server-Sent Events format. All four modes emit the same logical "change row" payload (`seq`, `id`, `changes`, optional `deleted`, optional `doc`). The `normal` and `longpoll` modes additionally wrap rows in a `{results, last_seq, pending}` envelope. Modeled directly from the official CouchDB documentation; nothing here is invented beyond what the docs describe.
View SpecView on GitHubApacheDatabaseDocument StoreJSONNoSQLOpen-SourceReplicationRESTAsyncAPIEventsWebhooks
Channels
{db}/_changes#feed=normal
subscribereceiveChangesNormal
Receive all past changes in one JSON envelope.
One-shot mode. The server collects all past changes since `since` (or `0`) and returns them in a single JSON envelope. Connection closes after the response body is fully written.
{db}/_changes#feed=longpoll
subscribereceiveChangesLongpoll
Block until one or more changes are available, then receive the envelope.
Long-poll mode. Request blocks until at least one change has occurred (or `timeout` is reached). The response shape is identical to `normal`: a single `{results, last_seq, pending}` envelope. The connection closes after the response is sent. Clients reissue requests with the returned `last_seq` to continue.
{db}/_changes#feed=continuous
subscribereceiveChangesContinuous
Stream NDJSON change rows on a long-lived HTTP response.
Continuous mode. The HTTP response stays open. Each change is emitted as a single line of JSON (newline-delimited JSON, NDJSON). Heartbeats are sent as empty lines on the `heartbeat` interval. After the configured `timeout`, the server emits a `last_seq` line and closes.
{db}/_changes#feed=eventsource
subscribereceiveChangesEventSource
Stream SSE-framed change events on a long-lived HTTP response.
EventSource mode. Same semantics as `continuous` but framed as Server-Sent Events (`text/event-stream`). Each change is delivered as an `event: ` / `data: ` block, with `id:` set to the row's `seq`. Heartbeats are emitted as SSE comment lines. The endpoint honors the `Last-Event-ID` header for reconnects.
Messages
✉
ChangesEnvelope
Changes Feed Envelope
Wrapped JSON response for `normal` and `longpoll` feeds.
✉
ChangeRowLine
Continuous Change Row
A single NDJSON line emitted by `feed=continuous`.
✉
LastSeqLine
Continuous Last Seq Line
Final NDJSON line emitted when the continuous feed closes.
✉
HeartbeatLine
Heartbeat
Empty line (continuous) or SSE comment line (eventsource) keeping the connection alive.
✉
ChangeRowSSE
EventSource Change Event
A change row delivered as an SSE event frame.
Servers
https
production{scheme}://{host}:{port}
A CouchDB node. Host, port, and scheme depend on deployment.
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.