WebSocket
Waypath provides a WebSocket connection for real-time intelligence update events. The dashboard uses this to update the Intelligence and Pipeline views live.
Connecting
const ws = new WebSocket('wss://api.waypath.app/ws')
ws.onopen = () => {
console.log('Connected to Waypath')
}
ws.onmessage = (event) => {
const mutation = JSON.parse(event.data)
console.log('Intelligence update:', mutation)
}For local development: ws://localhost:4747/ws
Mutation events
Each message contains an intelligence mutation event:
{
"type": "node_added",
"data": {
"id": "node_abc123",
"label": "Customer",
"properties": {
"name": "Sarah Chen",
"email": "sarah@example.com"
}
}
}Event types
| Type | Description |
|---|---|
node_added | A new entity was created |
node_updated | An existing entity’s properties changed |
node_removed | An entity was deleted |
edge_added | A new relationship was created |
edge_removed | A relationship was deleted |
graph_rebuilt | Intelligence was fully reconstructed from Pipeline data |
When events fire
WebSocket events broadcast on:
- Event ingestion (new touchpoints, customers)
- CRM mutations (Pipeline edits)
- Integration syncs (new data from connected platforms)
- Intelligence rebuilds (scheduled or triggered)