Statistics API: Real-time queue observation returning stale data or 429 errors?

We’re building a custom dashboard widget using the Embeddable Client App SDK to show real-time queue metrics. Specifically, we need the current waiting count and available agent count for a specific queue.

I’ve been hitting the /api/v2/analytics/queues/realtime endpoint. The documentation suggests this should provide near real-time data, but the numbers seem to lag by 10-15 seconds compared to the native Genesys UI.

Here’s the fetch logic:

const response = await fetch('/api/v2/analytics/queues/realtime', {
 headers: {
 'Authorization': `Bearer ${token}`,
 'Content-Type': 'application/json'
 },
 body: JSON.stringify({
 query: {
 entities: [{id: queueId, type: 'queue'}],
 metrics: ['queue.waiting', 'queue.agents.available']
 }
 })
});

When polling this every 5 seconds, I start getting 429 Too Many Requests errors after about 20 calls. The rate limits aren’t clearly defined for this specific endpoint in the public docs.

Is there a WebSocket alternative for queue stats? Or is there a specific header to request a snapshot instead of a streaming connection? The X-Genesys-SDK-Version header doesn’t seem to change the behavior.

I’ve also tried the /api/v2/analytics/queues/summary endpoint, but that only gives historical aggregates, which is useless for live monitoring.

What’s the recommended pattern for getting this data without hitting the rate limit wall?