Overview

All WebSocket messages are JSON objects with a type field. Messages flow in both directions: client→server and server→client.

Message Structure

Client → Server

Server → Client

Client Message Types

join

Join a conversation room to receive messages.
Response:

leave

Leave a conversation room.
Response:

message

Send a message to a conversation.
Broadcast (to all room members):

typing_start

Indicate user started typing.
Broadcast:

typing_stop

Indicate user stopped typing.
Broadcast:

read

Mark a message as read.

Server Message Types

joined

Confirmation of joining a room.

left

Confirmation of leaving a room.

message

New message received.

typing

Typing indicator update.
State values: start, stop

presence

User presence update.
State values: online, offline

receipt

Message receipt update.
State values: delivered, read

support

Support session event.
Event values: assigned, bot_takeover, closed

error

Error response.

Message Payload Details

Message Payload

Typing Payload

Presence Payload

Receipt Payload

Support Event Payload

Example: Complete Flow

Next Steps

Rooms

Room management

Messaging

Real-time messaging

Presence

Presence system

SDK

Use the SDK instead