Deno edge function returning empty array for Genesys Analytics Conversations Aggregates query

So I’m seeing a very odd bug with my Deno Deploy edge function that processes Genesys Cloud webhook events. I need to fetch historical conversation metrics for a specific queue to validate incoming data against our SLA thresholds. I am using the /api/v2/analytics/conversations/queues/aggregates endpoint. The authentication works fine-I get a valid bearer token via client_credentials-but the response body always returns an empty items array, even though I know there is data in that queue for the requested interval.

Here is the fetch call in my Deno script:

const url = "https://api.mynice.com/api/v2/analytics/conversations/queues/aggregates";
const params = new URLSearchParams({
 "interval": "PT1H",
 "groupBy": "queueId",
 "filter": `queueId eq "${QUEUE_ID}"`,
 "from": new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(),
 "to": new Date().toISOString()
});

const response = await fetch(`${url}?${params.toString()}`, {
 headers: {
 "Authorization": `Bearer ${TOKEN}`,
 "Content-Type": "application/json"
 }
});

const data = await response.json();
console.log("Items count:", data.items.length); // Always 0

I have verified the QUEUE_ID is correct and the time range definitely contains active conversations. The API returns a 200 OK status. I tried removing the filter parameter to see if I get any data, but the result is still empty. I also tried changing the interval to P1D (daily) with no luck. Is there a specific timezone format required for the from and to parameters in this specific endpoint? Or is the filter syntax for queueId incorrect? I am currently in Asia/Seoul timezone, but the API docs say it uses UTC. I am passing ISO strings. Any help would be appreciated.