Skip to main content

Endpoint

TLS is required; ws:// is not accepted. Send your key in the apikey header on the upgrade request. It is checked once, at connection time. After the socket is open no further authentication happens.
The browser WebSocket constructor cannot set custom headers. A browser can pass the key in the api_key query parameter instead (wss://api.eventory.ai/eventory/notifications/subscribe?api_key=…), but never ship your key in client-side code: anyone who loads the page can read it. Use a native client (Node.js, Python, Go, …) or proxy the connection through your own backend.

Lifecycle

  1. The gateway authenticates the request and checks that the key is granted the stream.
  2. The server checks that your watchlist is not empty. An empty watchlist is rejected with 400 before the upgrade.
  3. The request upgrades with the standard 101 Switching Protocols handshake.
  4. The server pushes JSON text frames. Anything you send over the socket is read and discarded; there is no client-to-server protocol. WebSocket pings are answered with pongs.
The server pings every connection every 30 seconds, so intermediaries do not close an idle socket. Most WebSocket clients answer pings automatically; sending your own pings is optional. A ping only proves the connection is up, not that notifications are flowing: track the time since the last message as well, and reconnect once it exceeds your threshold. Five minutes is a reasonable default. When the server’s own feed of notifications ends, it closes the socket with close code 1011: reconnect. A server restart drops the connection without a close frame. Treat any unexpected close as “reconnect with backoff”. The server restarts every few hours, so expect routine disconnects. Delivery is at-most-once. Each connection gets its own queue, created when it opens and deleted when it closes, so nothing is kept for you while you are disconnected and nothing is replayed when you reconnect.

Errors

These are HTTP responses returned before the upgrade completes. After the upgrade, a message that fails to parse on your side should be logged and skipped; the server keeps streaming.

Reconnection strategy

Use exponential backoff starting at one second, capped at 30 seconds, reset on a successful open. The stream is not rate limited, but a tight reconnect loop hammers the service while it recovers and reconnects no sooner.

Best practices

  1. One connection per account. A single socket covers your whole watchlist. Do not open one per event; extra sockets are for failover only, see Multiple connections.
  2. Reconnect with backoff. See above.
  3. Filter client-side for everything except the event, task_active and change_type.
  4. Treat event_infos as optional. It is omitted entirely when the platform does not expose metadata.
  5. Do not block in your message handler. Process notifications asynchronously so back-pressure never stalls the socket.
  6. Track time since the last message and reconnect after about five minutes of silence.
Last modified on October 31, 2026