Open lists and record pages update themselves when someone else changes the records they show. They use the same
socket as notifications (/socket.io, signed in with the session cookie or an access token). A client says what it
shows, and the server tells it when that changes. The client then reads the data again through the ordinary API, with
the reader's own access. No record values ever travel over the socket.
Watching: records:watch
A client sends records:watch with every list view and record it shows. Each message replaces the previous one, and
an empty message stops watching. Send it again after every reconnect.
socket.emit("records:watch", {
views: ["crm.leads"], // list, board, calendar, timeline or map views
records: [{ viewKey: "crm.lead-form", id: "6612…" }], // a record, through its form view
}, (answer) => {
// { ok: true, views: ["crm.leads"], records: [{ viewKey: "crm.lead-form", id: "6612…" }] }
});
The answer lists what the client may watch. Anything else is left out without an error:
- a view the reader can't open;
- a record the reader can't read in the role of its company.
A malformed message gets { ok: false, error }.
Limits
| What | At most |
|---|---|
| List views per socket | 20 |
| Records per socket | 20 |
| Records named in one change notice | 100 (a bigger write sends recordId: null) |
A message over the view or record limit is refused. The client keeps one watch per screen, counted, and sends the combined set.
What the Server Sends
records:changed: a record of a watched list's model changed in a company the reader works in (the selected
companies, else every company they reach).
{ "modelKey": "crm.lead", "eventId": "…", "occurredAt": "2026-10-15T10:02:11.000Z" }
This message is a signal only. It carries no record ids and no values. Read the list again with its filters, debounced: one command that writes many records sends one signal per model and company.
record:changed: a watched record was written by a command that committed.
{ "modelKey": "crm.lead", "recordId": "6612…", "op": "update", "revision": "2026-10-15T10:02:11.000Z",
"by": "65f0…", "byName": "Asha Rao", "eventId": "…", "occurredAt": "…" }
opiscreate,update,deleteorrestore.revisionis the record's last change (updatedAt).recordId: nullmeans the writer changed more records than one notice names; read your record again to find out whether it was one of them.- A write that rolls back is never announced.
- A notice older than a minute when it is delivered is dropped.
What never travels: field values, labels, the list's rows, and the ids of records that a list (as opposed to a record) watcher asked about.
Saving Over Someone Else's Change: If-Match
A record save can say which revision the edits were made against:
PATCH /api/views/crm.lead-form/records/6612… HTTP/1.1
If-Match: "2026-10-15T10:02:11.000Z"
PATCH /api/models/:key/records/:id takes the same header. The view route's answer carries the new revision for the
next save. If the record changed since, the save is refused and nothing is written:
HTTP/1.1 409 Conflict
{ "success": false, "error": { "code": "record_changed",
"message": "Someone else saved this record after you opened it: reload to see their change, or keep yours and save again",
"details": { "revision": "2026-10-15T10:05:40.000Z", "updatedBy": "65f0…", "updatedByName": "Asha Rao" } } }
To keep the user's edits, read the record again and save with the new revision. Without the header there is no check (the last save wins). A header that isn't an ISO date-time is a 400.
Team Chat Over the Socket
Team chat uses the same socket. Like the record notices, chat events are signals: a client re-reads what it shows
through /api/chat/* as its user.
chat:event (server to client), to a conversation's members, in batches of 500 people per relay row:
{ "kind": "message", "channelId": "…", "messageId": "…", "parentId": null, "by": "65f0…", "byName": "Asha Rao",
"excerpt": "Can you approve PO 12?", "seq": 42, "mentions": ["65f1…"], "mentionsChannel": false, "eventId": "…", "occurredAt": "…" }
kindismessage,edited,deleted,read,channel,reaction,pinned,thread(a reply kept in its thread),member,archivedorremoved(sent only to the people removed, so their list drops the conversation).excerptis plain text (markdown and tokens removed), and always null for a record conversation: its text goes only to people who can read the record now.mentionsnames at most 50 people.
chat:typing (client to server, with an acknowledgement) says the user is typing:
socket.emit("chat:typing", { channelId: "…", parentId: null }, (ack) => { /* { ok: true } */ });
The server relays it to the conversation's other members as chat:typing { channelId, parentId, userId, name, ttlMs: 6000 }: at most once per socket and conversation every 3 seconds, only from a member, and only in
conversations of at most 100 people. { ok: false } means it was not relayed.
chat:activity (client to server) { state: "active" | "away" } sets the socket's presence; a connected socket is
active. Presence is read by pull, GET /api/chat/presence?ids=a,b (at most 100 ids; people the reader can't see read
as offline), never pushed.