GET /api/v2/analytics/queues/realtime returning empty data for active queues

I’m trying to pull real-time stats for our main support queue using the Statistics API. The endpoint is GET /api/v2/analytics/queues/realtime. I’ve got the queue ID and I’m passing the correct time range, but the response body is coming back with an empty array for the data field.

{
 "requestId": "abc-123",
 "totalCount": 0,
 "data": []
}

We definitely have agents logged in and calls waiting. I’ve checked the permissions on the service account and it has queue:monitoring:view and analytics:view. If I use the admin UI, the numbers are there. Am I missing a required query parameter for the granularity or is this endpoint just broken for real-time data? The docs are vague on the exact payload structure for the request body if it’s even needed.

Have you double-checked the OAuth scopes on the access token you’re using? It’s super common for this endpoint to return an empty array if the token lacks analytics:read or :monitor. The API doesn’t always throw a 403 in these cases, which is annoying.

Try swapping in a token with full analytics permissions just to test. If that works, you know it’s a permission issue. If not, check the dateRange format. Genesys Cloud is picky about ISO 8601 with timezone offsets.

{
 "dateRange": {
 "start": "2023-10-27T15:00:00-07:00",
 "end": "2023-10-27T15:05:00-07:00"
 }
}

Also, make sure the queue ID is actually the internal UUID, not the email address or name. I’ve burned too much time on that one. If you’re still stuck, try hitting the /api/v2/queues/{queueId} endpoint first to verify the ID exists and is active. Real-time stats can sometimes lag if the queue was just created or if there’s a sync delay with the hybrid setup.