Chronicle Labs API is currently in beta. Reach out for access

API REFERENCE

Streaming

Subscribe to real-time event ingestion via Server-Sent Events.

Installnpm install @chronicle-labs/sdk
SDK generation in progress - until published, Node 18+ fetch works with no extra dependencies.

Endpoint

MethodPathStatus
GET/v1/events/stream
Planned for public GA

Parameters

tenant_idstringrequired

Tenant namespace.

event_typestring

Substring filter on event type.

conversation_idstring

Filter to one conversation.

Connect to stream

Chronicle replays buffered events on connect, then pushes live events. A keepalive ping is sent every 15 seconds. The SDK wraps SSE into an async iterator; use the HTTP fallback if the SDK stream helper is not yet available in your version.

Node
JS
// SDK (preferred)
for await (const event of chronicle.events.stream({
  tenant_id: "tenant_demo",
})) {
  console.log(event.event_type, event.event_id);
}

// HTTP fallback with eventsource
import EventSource from "eventsource";
const es = new EventSource(
  `${API_BASE}/events/stream?tenant_id=tenant_demo`,
  { headers: { Authorization: `Bearer ${API_KEY}` } },
);
es.addEventListener("event", (msg) => console.log(JSON.parse(msg.data)));
Response
JSON
event: event
data: {"event_id":"evt_01J8...","tenant_id":"tenant_demo","source":"intercom","event_type":"support.message.customer"}