Hosted real-time collaboration
wss://cloud.richtexteditor.com/v1/collab is an authenticated WebSocket in front of a Yjs relay. It speaks the standard y-websocket sync and awareness protocol, so the stock provider connects to it unmodified — there is no proprietary client to install.
Connect
Credentials go in the query string, not a header: browsers cannot set headers on a WebSocket handshake. Use key for an API key or token for a session token — the same credentials as the REST data plane.
import * as Y from "yjs";
import { WebsocketProvider } from "y-websocket";
const doc = new Y.Doc();
const provider = new WebsocketProvider(
"wss://cloud.richtexteditor.com/v1/collab?key=" + RTE_KEY,
"release-notes", // room name
doc
);Pass the same Y.Doc to the editor's collabTextSync: "crdt" configuration and every connected client converges on the same document, with live cursors and presence.
Rooms
A room name is 1–128 characters and may not contain / or ... Rooms are namespaced per account before they reach the relay, so two customers who both pick notesnever see each other's document — the name you choose does not have to be unguessable.
Your plan limits concurrent rooms, not total rooms. A room counts while at least one socket is connected to it and is released when the last one leaves; additional participants joining a room that is already live never count again, so a 5-room plan supports five simultaneous documents with any number of people in each.
| Plan | Concurrent rooms |
|---|---|
| Free | 1 |
| Start | 5 |
| Team | 25 |
| Business | 250 |
Status codes
These are returned on the handshake, before the socket opens.
| Code | When |
|---|---|
| 101 | Upgraded; the relay is now pumping frames both ways |
| 400 | Room name is empty, over 128 characters, or contains / or .. |
| 401 | Missing or invalid key / token |
| 402 | Opening this room would exceed your plan's concurrent-room limit |
| 426 | A plain HTTP request reached the endpoint — a WebSocket upgrade is required |
Self-hosting
The relay is an ordinary Yjs WebSocket server. If you run the API yourself, point Cloud:CollabSidecarUrl at your own relay — the auth, room namespacing, and plan gating all stay in the API layer, so the relay never needs to be reachable from the public internet.
See the full API reference or create a free account →