Developer ResourcesCommunication
Communication Realtime Implementation
Realtime architecture, room contracts, and client integration flow for Communication v1.
Communication Realtime Implementation
Scope (v1)
Realtime is an additive delta + notification layer over REST for:
- channel post stream updates
- channel discussion message updates
It is not the same thing as mobile push notification delivery:
- realtime updates flow over websocket rooms
- broadcast post push notifications are driven by explicit channel membership
- channel membership does not bypass access policy checks
Room Names
- Channel posts room:
communication:channel:{channelId}:posts - Discussion messages room:
communication:discussion:{discussionId}:messages
Socket Client Events
communication:join_channel_posts- payload:
{ "channelId": number }
- payload:
communication:leave_channel_posts- payload:
{ "channelId": number }
- payload:
communication:join_discussion- payload:
{ "channelId": number }
- payload:
communication:leave_discussion- payload:
{ "discussionId": number }
- payload:
communication:sync_channel_posts- payload:
{ "channelId": number, "sinceEventId"?: string, "limit"?: number }
- payload:
communication:sync_discussion- payload:
{ "channelId": number, "sinceEventId"?: string, "limit"?: number }
- payload:
Join/Leave Authorization
- JWT is required for all communication websocket events.
- Channel post room join reuses channel read policy checks.
- Discussion room join reuses:
- channel access checks
- discussion enabled check
- discussion feature requirement check (
requiredFeatureKey) - discussion ban check
Important access rule:
- If a gated user loses channel entitlement, they cannot join channel or discussion realtime rooms for locked content.
- A joined user may still receive broadcast mobile push during the 7-day grace window, but realtime discussion access remains blocked until entitlement is restored.
Error codes from join/sync handlers:
UNAUTHORIZEDFORBIDDENNOT_FOUNDVALIDATION_ERRORSERVICE_UNAVAILABLE
Server Event Names
communication.channel_post.createdcommunication.channel_post.updatedcommunication.channel_post.deletedcommunication.channel_post.pinnedcommunication.discussion_message.createdcommunication.discussion_message.updatedcommunication.discussion_message.deletedcommunication.discussion_message.restored
Event Envelope
Every communication event payload follows:
{
"eventId": "019d....",
"eventType": "communication.channel_post.created",
"occurredAt": "2026-03-17T10:15:00.000Z",
"data": {}
}Payload rules:
- delta only (no speculative fields)
- includes entity id + context id + timestamps + actor
- delete payloads are tombstones (
isDeleted,deletedAt) instead of full object snapshots
Reconnect & Replay Flow
- Connect/reconnect websocket.
- Rejoin required communication rooms.
- Call sync event with last processed
sinceEventId. - Client dedupes by
eventIdand applies in order. - If replay fails or gap is detected, fallback to REST refetch.
Sequence Flow
Client Integration Checklist
- Keep REST as source of truth for initial/full state.
- Use realtime only for incremental UI updates.
- Store last
eventIdper joined room. - On reconnect:
- rejoin rooms
- sync from last
eventId - fallback to REST if needed.