Database changes
Subscribe to inserts, updates and deletes on a table as they happen.
Realtime
One WebSocket connection carries database changes, broadcast messages and presence. Private channels follow the same row-level security as your tables.
What’s included
Subscribe to inserts, updates and deletes on a table as they happen.
Receive only the rows you care about, such as room_id=eq.42. The server applies the filter before it sends the event.
Send messages between clients on a channel, with optional server acknowledgement.
Track users on a channel and react when they join, leave or update their state.
Row-level security policies decide who can join a private channel, and are checked again when the token refreshes.
Require every channel of a project to be private, whatever the client asks for.
Publish from a server or an edge function with one request.
A heartbeat detects dead connections, and the client reconnects with backoff and jitter, then re-subscribes its channels.
Follow the connection state, get transport errors with the phase that failed, and see why a channel was refused.
How it works
The SDK opens one WebSocket with the user’s token.
Join a channel; the server checks access and confirms.
Database changes, broadcasts and presence arrive on that channel.
If the link drops, the SDK reconnects and re-subscribes.
Endpoints
Send your project’s API key or the user’s token with each request.
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/realtime/ws | Open the WebSocket connection. Channels are multiplexed over it. |
| POST | /v1/realtime/broadcast | Send a broadcast over HTTP, without a WebSocket. |
Questions
Ready to go live?
Realtime is included in every project. No credit card required.