WebSocket API
The WebSocket API provides real-time event streams for messaging, computation events, and presence. Connect via wss://www.zeq.dev/ws.
Connection
const ws = new WebSocket('wss://www.zeq.dev/ws');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'auth',
token: 'YOUR_SESSION_KEY'
}));
};
Event Types
message
New message received in a conversation.
typing
User started/stopped typing in a conversation.
presence
User online/offline/ghost status change.
read
Message read receipt.
computation
New computation result from the Compute API. Used by the Globe app to render live computation events.