Hey everyone,
Running into a wall with the Analytics API. I’m trying to pull interaction volume data for the last 90 days to feed into our internal BI dashboard. The endpoint is POST /api/v2/analytics/interactions/queue/summary.
When I send the request with the full date range, I get a 413 Request Entity Too Large error. I thought this was a body size limit, but the JSON payload is tiny. It seems like the server is rejecting the query because the resulting dataset is too big, or maybe the interval itself is too wide for a single call.
Here is the payload I’m sending:
{
"interval": "P1D",
"dateFrom": "2023-10-01T00:00:00.000Z",
"dateTo": "2023-12-30T00:00:00.000Z",
"groupings": ["queueId"],
"metrics": [
"conversation/count",
"conversation/abandoned/count"
]
}
I tried reducing the interval to P1H but that just makes the request body larger and fails faster. I also tried chunking the dates manually in my Node.js script, splitting the 90 days into three 30-day chunks. That works for now, but it feels hacky. Is there a proper way to handle this?
The docs mention pagination, but that’s for the result set, not the query range. I don’t see a maxDateRange parameter.
Here is the error response:
{
"code": 413,
"message": "Request Entity Too Large"
}
I’ve been running these queries via the Node SDK. I can’t find any mention of a hard limit on dateTo - dateFrom in the API reference. Is 90 days just too much for a single call? Should I be using the dateFrom/dateTo parameters differently?
Also, I noticed that if I reduce the range to 30 days, it works fine. So it’s definitely the span.
What’s the standard pattern here? Do I just keep splitting the range until it works, or is there a better approach? I don’t want to hit rate limits by firing off 3 separate calls for every report run.
Thanks.