Stream Chat Realtime WebSocket API
Version 1.0.0
AsyncAPI 2.6 description of Stream (GetStream.io) Chat's **real-time WebSocket** surface. Unlike the request/response server-side REST API (`https://chat.stream-io-api.com`, modeled in `openapi/getstream-openapi.yml`), Stream's client SDKs establish a persistent, bidirectional **WebSocket** connection to receive real-time chat events. Per Stream's official docs (getstream.io/chat/docs), every client-side chat integration opens a WebSocket connection via `client.connectUser()`; the connection is how devices receive real-time events. Stream limits the number of open connections per user to 50 in production and 3 in development. ## How the connection is opened A client connects by opening a WebSocket to `wss://chat.stream-io-api.com/connect` with the connection payload and credentials passed as query parameters: - `json` - a URL-encoded JSON object containing `user_details` (at minimum the `id`) and `user_token`. - `api_key` - the application API key. - `authorization` - the user's JWT. - `stream-auth-type` - the literal string `jwt`. On a successful handshake the server immediately emits a `health.check` event carrying a `connection_id`; this same event is re-sent periodically as a heartbeat to keep the socket alive. Thereafter the server pushes chat events (message.new, typing.start, reaction.new, notification.*, user.presence.changed, and others) for the channels the user is watching. The client sends `health.check` events back as keep-alives. Event names and fields are taken from Stream's documented event object (getstream.io/chat/docs/node/event_object).
Channels
Messages
Servers
chat.stream-io-api.com