The iOS SDK (2.0.6+) manages this connection for you, including automatic reconnection. You typically only call this endpoint directly from server-side consumers.
Request
Headers
Query parameters
Response
flags. Each event carries the full flag configuration for the requested environment (the same shape as GET /api/v1/flags) — replace your cached config wholesale on every event, no diffing required:
Flag values are typed (boolean, integer, double, string, or JSON), resolved for the requested environment.
Keepalives
Every 20 seconds the server writes an SSE comment line::) are ignored by spec-compliant SSE parsers. They exist purely to defeat idle timeouts at every hop between your client and the server — including the iOS SDK’s 75-second URLSession idle timeout (SDK 2.0.6) and CDN proxy idle cutoffs. If you write your own SSE client, make sure it tolerates comment lines and does not treat them as events.
Reconnection
Connections can still drop (network changes, deploys, proxy resets). Reconnect with exponential backoff; on reconnect the firstflags event immediately restores the current configuration, so no state is lost.
SDK 2.0.6+ handles all of this automatically — keepalive tolerance, the 75s idle timeout, and reconnection with backoff. If flag streaming silently stalls on older SDK versions, upgrade to 2.0.6 or later.
See also
- Get Flags — one-shot polling equivalent
- Feature Flags in the SDK