SITEMAP / DOCS / API REFERENCE

WebSocket

Waypath provides a WebSocket connection for real-time intelligence update events. The dashboard uses this to update the Intelligence and Pipeline views live.

01Connecting

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)
}

If you're targeting a non-production endpoint, swap the host — staging, a self-hosted instance, or a local proxy — anywhere the API is reachable.

02Mutation 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

TypeDescription
node_addedA new entity was created
node_updatedAn existing entity's properties changed
node_removedAn entity was deleted
edge_addedA new relationship was created
edge_removedA relationship was deleted
graph_rebuiltIntelligence was fully reconstructed from Pipeline data

03When events fire

WebSocket events broadcast on: