---
title: Realtime
description: Channels that push messages to browsers and apps over WebSocket or Server-Sent Events, with ordered history, resume from a cursor, and presence.
type: tutorial
product: realtime
summary: What a channel is, how clients connect, and where to go next.
updated: 2026-10-07
order: 0
---

A [Realtime Channel](/docs/api/realtime_channels) is an ordered stream of
messages in one environment. Your server publishes to it with a key; every
connected browser, app or device receives each message as it is appended, and
a client that drops resumes from the last message it saw. Realtime is part of
Sylphx Events: there is nothing to deploy, one key in your project is enough.

## What a channel gives you

- **Ordered history.** Every message gets a `sequence` (from 1, gap-free) and a
  `cursor`, and is kept for the channel's `spec.history_retention`: 24 hours by
  default, at most 7 days.
- **Resume, not replay by hand.** A client that reconnects sends its last
  cursor and receives exactly the messages after it. Server-Sent Events clients
  do this on their own through `Last-Event-ID`.
- **Two transports.** `status.connect_uri` is a WebSocket that pushes messages
  and carries presence; `status.stream_uri` is Server-Sent Events, for clients
  that only read.
- **Clients hold no secret.** Your server mints a short-lived token
  (`rtt_…`, at most an hour) for one channel, and the client connects with it.
  A channel with `spec.publishable_ok` also admits a publishable key.
- **Presence.** A token that names a client id puts that client in the
  channel's [members](/docs/api/realtime_members) while it is connected, and
  the channel carries `presence.enter` and `presence.leave` messages.
- **Idempotent publish.** A publish retried with the same `Idempotency-Key`
  returns the first message instead of appending a second.

## Names and ids

<KeyValue
	items={[
		{ key: 'Channel', value: 'orgs/{org}/projects/{project}/envs/{env}/realtime_channels/{realtime_channel}', mono: true },
		{ key: 'Channel id', value: 'rtc_<cell><ulid>', mono: true },
		{ key: 'Message', value: '…/realtime_channels/{realtime_channel}/realtime_messages/{realtime_message}', mono: true },
		{ key: 'Message id', value: 'rtm_<cell><ulid>', mono: true },
		{ key: 'Subscribe token', value: 'rtt_…', mono: true },
	]}
/>

## The scopes

- `events:write` — creating, changing and deleting a channel.
- `events:publish` — publishing a message, and minting a subscribe token.
- `events:read` — reading channels, their message history and their members.
- `events:realtime:subscribe` — connecting to a channel's stream with a key
  instead of a token. A publishable key may hold it, for channels that allow
  publishable keys. [Keys and scopes](/docs/platform/keys-and-scopes) covers
  the two kinds of key.

<RelatedDocs
	links={[
		{
			href: '/docs/realtime/quickstart',
			label: 'Quickstart',
			description: 'Create a channel, connect a client, publish, and resume after a drop.',
		},
		{
			href: '/docs/api/realtime_channels',
			label: 'The realtime_channels collection',
			description: 'Every method, field and example.',
		},
		{
			href: '/docs/api/realtime_messages',
			label: 'The realtime_messages collection',
			description: "Reading a channel's history.",
		},
		{
			href: '/docs/api/realtime_members',
			label: 'The realtime_members collection',
			description: 'Who is connected to a channel now.',
		},
	]}
/>
