GET /api/v2/interactions/queues?queueId=12345&interval=last10seconds
The response shows waitingCount as 0 but the queue dashboard clearly shows 5 people waiting. We are building a real-time status widget for our custom agent desktop using the Embeddable Client App SDK. The goal is to show agents the current queue pressure without them having to switch tabs. We are polling the Statistics API every 5 seconds using axios. The code looks like this:
const response = await axios.get(‘/api/v2/interactions/queues’, {
params: { queueId: this.queueId, interval: ‘last10seconds’ }
});
We see the 200 OK status every time. The JSON payload always returns accurate agentCount but the waitingCount and longWaitCount seem to lag by about 30-60 seconds. We tried changing the interval to ‘last1minute’ but that makes it even worse. We are not seeing any caching headers in the response that suggest we should wait. Is there a specific header or parameter we need to include to force a cache miss or get truly real-time data? Or is the Statistics API just not designed for sub-second accuracy and we need to use webhooks instead?