Marfa emits live events on a per-tenant Server-Sent Events stream. Clients that need to reflect changes in real time subscribe toDocumentation Index
Fetch the complete documentation index at: https://docs.myme.so/llms.txt
Use this file to discover all available pages before exploring further.
GET /events.
Connecting
:) are heartbeats. The server sends one every ~30 seconds. Treat an idle stream longer than 60s as disconnected and reconnect.
Event types
Payloads are filtered by the subscriber’s permissions — the server won’t stream events for items or edges the credential can’t read.Event catalog (quick reference)
Event catalog (quick reference)
| Event | Payload |
|---|---|
item.created | Full item object. |
item.updated | Full item object (after update). |
item.state_changed | Full item object (after transition). |
item.deleted | { id, type }. |
item.restored | Full item object (after restore). |
edge.created | Full edge object. |
edge.deleted | { id, edge_type, source_id, target_id }. |
metadata.changed | { item_id, tags, tier, state }. |
Filtering
Clients can subscribe to a subset of events:Reconnecting with Last-Event-ID
On reconnect, the client sends the Last-Event-ID header with the last event id it received:
EventSource API in browsers handles Last-Event-ID automatically. Non-browser clients (SDKs, server-to-server consumers) should persist the most recent event id and re-send it on reconnect.
When the event log is stale
IfLast-Event-ID is older than the event log retention window, the server replies with a terminal event indicating the gap:
GET /items?updated_after=<timestamp>&limit=... sweep (paginated), then reconnect to live streaming.
This path doesn’t surface deletes — items deleted during the gap aren’t returned. A subsequent SSE delete event will reconcile on receipt. Clients that need deterministic delete reconciliation after long outages should keep the SSE stream within retention or re-seed the local store.
Catch-up strategy
A typical sync engine follows this pattern:Keepalive
The server sends:ping comment frames every ~30 seconds. Clients should close the connection and reconnect if no event (including pings) arrives for > 60 seconds — the connection is likely dead even if the TCP socket is open.
Scale
SSE is single-process on the emitting server. For deployments behind load balancers or multi-instance setups, configure sticky sessions or use the webhook delivery system instead — webhooks are durable and don’t require persistent connections.SSE vs webhooks
| Use case | Use |
|---|---|
| Live UI that updates as data changes | SSE |
| Long-running server ingesting events | SSE (or webhooks with a local queue) |
| Triggering workflows in external systems | Webhooks |
| Integrating with services that expect HTTP POST | Webhooks |