Skip to Content
These docs are actively being updated. Check back regularly for new guides and API references.
API ReferenceWebSocket

WebSocket

Waypath provides a WebSocket connection for real-time graph mutation 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('Graph mutation:', mutation) }

For local development: ws://localhost:4747/ws

Mutation events

Each message contains a graph mutation event:

{ "type": "node_added", "data": { "id": "node_abc123", "label": "Customer", "properties": { "name": "Sarah Chen", "email": "sarah@example.com" } } }

Event types

TypeDescription
node_addedA new node was created in the graph
node_updatedAn existing node’s properties changed
node_removedA node was deleted
edge_addedA new relationship was created
edge_removedA relationship was deleted
graph_rebuiltThe full graph was 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)
  • Graph rebuilds (scheduled or triggered)