Events reference
Realtime socket events delivered to clients, and webhook events delivered to your backend.
Client events (socket)
The client SDK maps socket events to listeners. You rarely need the raw names, but they appear in logs and in the Playground.
| Socket event | SDK listener | Payload |
|---|---|---|
message:created | onMessage | ConversationEvent with type: 'message.created' |
message:updated | onMessage | type: 'message.updated' (edit) |
message:deleted | onMessage | type: 'message.deleted' |
reaction:added | onMessage | type: 'reaction.added', with reaction |
reaction:removed | onMessage | type: 'reaction.removed', with reaction |
conversation:read | onRead | { conversationId, userId, seq } |
conversation:updated | onConversationUpdated | { conversationId, reason } |
typing:start / typing:stop | onTyping | { conversationId, userId, typing } |
presence:changed | onPresenceChange, presence.subscribe | { userId, status, lastSeenAt } |
call:invited … call:ended | onCallStateChange | Call signal sent by your backend |
session:expiring | Handled by the SDK | Triggers a token refresh |
A ConversationEvent is { conversationId, seq, type, message, reaction, createdAt }, where message is the message’s current snapshot.
Delivery guarantees
- Events for one conversation are applied in
seqorder. Duplicates are ignored, and gaps trigger a fetch from history. - After any reconnect, the SDK resyncs every tracked conversation, so missed events are recovered.
- Typing and presence events are not stored and are not replayed.
Media events
Call media events come from LiveKit on session.room (for example ParticipantConnected, TrackSubscribed, ConnectionStateChanged). Listen with room.on(RoomEvent.…) or use LiveKit React hooks. session.onStateChange reports the simplified connection state.
Webhook events (server)
| Type | Trigger |
|---|---|
call.started | The media room started |
call.ended | The call ended |
participant.joined | A device joined a call |
participant.left | A device left or was removed |
message.created | A message was stored |
Payload fields, signatures and retries are described in webhooks.