Realtime gateway
Subscribe to organisation changes and resume after reconnecting.
The gateway is a WebSocket stream for changes in the API key's organisation:
wss://api.strave.gg/v1/gatewayEach dispatch identifies the resource that changed. Fetch that REST resource again to receive its current state.
Connection lifecycle
- The server sends
hellowith the heartbeat interval. - Send
identifywith an API key and optional last sequence. - The server sends
ready. - Send
subscribewith topic patterns. - Process
dispatchmessages in sequence order. - Send
heartbeatat the advertised interval.
{
"op": "identify",
"apiKey": "strave_api_key",
"resumeAfter": 482
}{
"op": "subscribe",
"topics": ["match.*", "event.*"]
}Use ["*"] to receive every available organisation event.
Dispatch envelope
{
"op": "dispatch",
"sequence": 483,
"id": "evt_01...",
"type": "match.score.updated",
"occurredAt": "2026-07-26T18:14:22.000Z",
"resource": {
"type": "match",
"id": "match_01...",
"eventId": "event_01..."
}
}sequence is monotonic per organisation. Persist the highest fully processed
value and send it as resumeAfter after reconnecting.
Resume after reconnecting
Gateway records are retained for seven days and returned in batches. Delivery is at least once across reconnect boundaries, so processing should be idempotent.
WebSocket connections can close during network or service interruptions. The official SDK reconnects and resumes automatically; custom clients must do the same.
If a saved sequence is older than seven days, fetch the required REST collections again and continue from the newest received sequence.