FeatureGate

Subscribe to snapshot invalidations

Opens a Server-Sent Events stream for best-effort snapshot freshness notifications. SDKs should still keep ETag polling as the source of truth.

GEThttps://api.featuregate.dev/v1/snapshot/stream
Authenticate with a server runtime key in the Authorization header.runtime:snapshot

This endpoint takes no parameters.

Request
sh
curl -X GET https://api.featuregate.dev/v1/snapshot/stream \
  -H "Authorization: Bearer fg_sk_test_0123456789abcdef0123456789abcdef0123456789abcdef"

Returns

environmentobjectrequired
idstringrequired

Stable environment identifier, prefixed with env_.

Length: 1+

keystringrequired

URL-safe environment key such as production or staging.

Length: 1+

namestringrequired

Human-readable environment name.

Length: 1+

generatedAtstringrequired

Event generation timestamp.

projectIdstringrequired

Project whose snapshot changed.

Length: 1+

versionstringrequired

Snapshot version after the change.

Length: 1+

Example response · 200
json
{
  "projectId": "project_example",
  "version": "snapshot_version_example",
  "generatedAt": "2026-06-18T00:00:00.000Z",
  "environment": {
    "id": "env_example",
    "key": "production",
    "name": "Production"
  }
}

Responses

200Server-Sent Events carrying snapshot readiness, invalidation, heartbeat, and close events.
400Validation failed.
401Authentication failed.
403The key is not allowed to access this resource.
429Rate limit exceeded.
500Unexpected server error.