Connection Status Disconnected
Latency: -- ms | Messages: 0 | Uptime: 00:00:00
Event Stream

Supported Events

client.connect
Triggered when a new WebSocket connection is successfully established and authenticated.
{ "session": "sess_8x92...", "ts": 1715429201, "ip": "192.168.1.1" }
data.sync
Emitted when real-time data synchronization occurs across nodes or clients.
{ "type": "delta", "payload": { ... }, "checksum": "a3f9..." }
server.ping
Keep-alive signal from the server. Clients should respond with client.pong.
{ "ts": 1715429205, "seq": 42 }
error.timeout
Connection or request timeout. Indicates network instability or processing delays.
{ "code": 4088, "msg": "handshake_timeout", "retry": true }
auth.validate
Authentication challenge/response cycle for secure channel establishment.
{ "token": "eyJ...", "role": "admin", "expires": 3600 }
system.shutdown
Graceful termination signal. Clients should persist state and reconnect automatically.
{ "reason": "maintenance", "eta_sec": 300, "id": "maint_v2" }

Quick Start

// JavaScript Example const ws = new WebSocket('wss://api.divisions.dev/ws/v2'); ws.onopen = () => { console.log('Connected to #divisions'); ws.send(JSON.stringify({ type: 'auth', token: process.env.API_KEY })); }; ws.onmessage = (e) => { const data = JSON.parse(e.data); if (data.type === 'data.sync') handleSync(data); };