Genesys Analytics API returning 413 Entity Too Large for 90-day query

I’m trying to pull historical queue performance data for our London support center using the Analytics API. I need the full 90-day window for a compliance audit, so I’m hitting /api/v2/analytics/details/queries with a dateFrom and dateTo that covers exactly three months.

The request body looks like this:

{
 "dateFrom": "2023-10-01T00:00:00.000Z",
 "dateTo": "2023-12-31T23:59:59.999Z",
 "groupBy": ["queueId"],
 "filter": {
 "type": "and",
 "clauses": [
 {
 "dimension": "queueId",
 "type": "in",
 "values": ["my-queue-id-here"]
 }
 ]
 },
 "view": "default",
 "metrics": [
 "queue/offerCount",
 "queue/answerCount",
 "queue/waitTime"
 ]
}

When I send this via Postman or our Python script, I get a 413 Request Entity Too Large response. I’ve checked the headers and the payload size is nowhere near the documented limits for the request body itself. It feels like the API is rejecting the query before it even runs because the result set is too big.

I know I could just run multiple smaller queries and stitch them together in code, but I’m wondering if there’s a better way. Is there a pagination parameter I’m missing? Or should I be using a different endpoint for bulk historical data? I’ve tried adding page and pageSize to the body but those don’t seem to apply to detail queries.

Here’s the Python snippet I’m using to make the call:

import requests

headers = {
 'Authorization': 'Bearer ' + token,
 'Content-Type': 'application/json'
}

response = requests.post('https://api.mypurecloud.com/api/v2/analytics/details/queries', headers=headers, json=payload)
print(response.status_code)
print(response.text)

It just keeps failing with 413. Any ideas on how to handle this without manually splitting the dates in a loop?