📡

Developers

WebSocket Events

Live state for dashboards & integrations

Subscribe to session lifecycle, queue depth, agent presence, and recording-complete events. Push live updates to your in-house tools without polling.

Pub/Sub

Topic-based subscriptions

Auto-resume

Last event ID on reconnect

JWT auth

Short-lived tokens

<200ms

Event-to-client latency

01

Streams you can subscribe to

Connect with a signed JWT. Subscribe to topics by queue, agent, tenant, or globally. The server pushes JSON events as they happen. Reconnect with exponential backoff and resume from your last event ID.

  • session.* (created, connected, ended, dropped, transferred)
  • queue.* (depth-changed, abandoned, max-wait-exceeded)
  • agent.* (online, offline, status-changed, busy, break)
  • recording.* (started, finished, failed, deleted)
  • qa.* (scorecard-saved, dispute-raised, score-updated)
02

Why WebSocket over polling

Most internal dashboards we've seen poll the REST API every 5 seconds. That's 17,000 requests per agent per day. WebSocket events deliver the same data within 200ms of the underlying state change, with one-thousandth the request volume.

03

Client libraries

TypeScript, Python, and Go clients ship with auto-reconnect, exponential backoff, last-event-id resume, and topic-subscription helpers. Plain WebSocket clients work too — protocol is documented in the OpenAPI spec.

EX

Subscribe to live queue depth

ts
import { GlobeMeetWS } from '@globemeet/sdk';

const ws = new GlobeMeetWS({
  endpoint: 'wss://api.globemeet.in/v1/events',
  token: 'jwt-from-oauth-exchange',
});

ws.subscribe('queue.support.depth-changed', (event) => {
  console.log('Queue depth:', event.data.depth);
  console.log('Longest wait:', event.data.longest_wait_seconds);
});

ws.subscribe('session.support.connected', (event) => {
  console.log('Customer connected to agent:', event.data.agent_id);
});

ws.on('reconnect', () => console.log('reconnected, resuming'));
SPEC

Technical specifications

Transport
WebSocket over TLS 1.3
Auth
JWT, 15-minute expiry, refresh via OAuth
Subprotocol
globemeet-events.v1
Frame format
JSON; one event per text frame
Resume
Last-Event-ID header on reconnect
Backpressure
Server drops with 'overflow' event if client lags >5s