Real-Time

Stop polling. Subscribe once.

One persistent SSE connection pushes deliveries, bounces, inbound intent, policy blocks, journey completions, and coordination events to your agent as they happen. Your agent knows about a bounce before it attempts the next send.

How it works

Open a connection to GET /v1/agent/events/stream with your Bearer token. The server holds it open and pushes events as JSON payloads using the standard Server-Sent Events protocol. Any HTTP client that supports streaming works: curl, EventSource in browsers, fetch in Node, httpx in Python.

Filter by event type using wildcards ( eventTypes=delivery.*) or by contact email to isolate a single recipient's events. Disconnected? Reconnect with since=<eventId> and the server replays everything you missed. Events are persisted, so nothing is lost during brief outages.

What the stream looks like

$ curl -N -H "Authorization: Bearer mm_live_..." \
    "https://api.molted.email/v1/agent/events/stream"

event: delivery.delivered
data: {"requestId":"req_a1b2","recipientEmail":"alice@example.com","deliveredAt":"2026-03-22T10:05:00Z"}

event: inbound.classified
data: {"messageId":"msg_x9y8","from":"alice@example.com","intent":"interested","confidence":0.95}

event: policy.blocked
data: {"requestId":"req_c3d4","recipientEmail":"bob@example.com","reason":"cooldown_active"}

All event types

Filter with wildcards: delivery.*, send.*, inbound.*, journey.*, coordination.*, followup.*, and more. Or subscribe to everything.

EventDescription
send.queuedSend request accepted and queued for delivery
send.approval_pendingSend held for human approval
send.approval_decidedApproval granted or denied
delivery.queuedEmail queued for provider delivery
delivery.acceptedProvider accepted the message
delivery.sentEmail dispatched by the provider
delivery.deliveredEmail delivered to recipient inbox
delivery.deferredDelivery temporarily deferred, will retry
delivery.bouncedHard or soft bounce
delivery.complainedRecipient marked email as spam
delivery.failedDelivery failed permanently
inbound.classifiedInbound email classified by intent
inbound.routedInbound email routed to a thread
policy.blockedSend rejected by policy engine
journey.step_completedContact completed a journey step
journey.completedContact finished or exited a journey
coordination.lease_acquiredAgent acquired a contact lease
coordination.lease_releasedAgent released a contact lease
coordination.consensus_requestedMulti-agent consensus vote started
followup.scheduledFollow-up email scheduled
followup.executedScheduled follow-up sent
thread.sla_breachedThread response SLA exceeded

Why SSE over webhooks

Webhooks require a public endpoint, TLS, signature verification, and retry logic. SSE requires one line of code. Your agent opens a connection and events arrive within milliseconds of occurring. No delivery queue, no retry backoff, no exposed endpoints.

If your agent disconnects, it reconnects and replays missed events from its last known position. SSE handles reconnection automatically in most clients. And since events are scoped to your tenant, there is no cross-tenant leakage to worry about.

Build a reactive agent

Subscribe to delivery and inbound events. Auto-suppress on hard bounces. Trigger a follow-up workflow the moment a reply is classified as interested.

const EventSource = require('eventsource');

const es = new EventSource(
  'https://api.molted.email/v1/agent/events/stream?eventTypes=delivery.*,inbound.*', {
    headers: { Authorization: 'Bearer mm_live_...' }
  }
);

es.addEventListener('delivery.bounced', (e) => {
  const data = JSON.parse(e.data);
  console.log('Bounce:', data.recipientEmail, data.bounceType);
  // Auto-suppress hard bounces, retry soft bounces
});

es.addEventListener('inbound.classified', (e) => {
  const data = JSON.parse(e.data);
  if (data.intent === 'interested') {
    // Trigger follow-up workflow
  }
});

One connection. Every event.

Deliveries, bounces, inbound intent, policy decisions, journey progress, coordination signals. All streamed as they happen, all filterable, all replayable.