Skip to main content
Use the SDK or CLI to backfill and stream events for quick observability. Mermaid (architecture) SDK (Node)
import { Fluxomail } from '@fluxomail/sdk';
const fm = new Fluxomail({ apiKey: process.env.FLUXOMAIL_API_KEY });
const { events, nextCursor } = await fm.events.list({ types: ['email.delivered'], limit: 50 });
SDK (Browser)
const res = await fetch('/api/fluxomail/token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ organizationId: '<orgId>' }) });
const { token } = await res.json();
const es = new EventSource('/api/v1/events/stream?types=email.*&token=' + encodeURIComponent(token));
es.onmessage = (ev) => console.log('event', JSON.parse(ev.data));
CLI
fluxomail events tail --api-key $FLUXOMAIL_API_KEY --types email.*