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.
| Event | Description |
|---|---|
| send.queued | Send request accepted and queued for delivery |
| send.approval_pending | Send held for human approval |
| send.approval_decided | Approval granted or denied |
| delivery.queued | Email queued for provider delivery |
| delivery.accepted | Provider accepted the message |
| delivery.sent | Email dispatched by the provider |
| delivery.delivered | Email delivered to recipient inbox |
| delivery.deferred | Delivery temporarily deferred, will retry |
| delivery.bounced | Hard or soft bounce |
| delivery.complained | Recipient marked email as spam |
| delivery.failed | Delivery failed permanently |
| inbound.classified | Inbound email classified by intent |
| inbound.routed | Inbound email routed to a thread |
| policy.blocked | Send rejected by policy engine |
| journey.step_completed | Contact completed a journey step |
| journey.completed | Contact finished or exited a journey |
| coordination.lease_acquired | Agent acquired a contact lease |
| coordination.lease_released | Agent released a contact lease |
| coordination.consensus_requested | Multi-agent consensus vote started |
| followup.scheduled | Follow-up email scheduled |
| followup.executed | Scheduled follow-up sent |
| thread.sla_breached | Thread 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.
Related features