How do I actually paginate through /api/v2/analytics/conversations/details/query? The docs are a bit vague on whether this endpoint supports standard page/pageSize parameters or if I need to use a cursor-based approach like some of the other analytics endpoints.
I’m writing a Kotlin service to export conversation details for the last 30 days. I’ve tried adding page=2 to the query string, but the response just returns the same first set of records. It’s like the page parameter is being ignored entirely.
Here’s what I’ve got so far:
- Using
OkHttpClientwith a Bearer token from Client Credentials flow - Endpoint:
GET /api/v2/analytics/conversations/details/query - Payload includes
dateRange(last 30 days),groupBy(none), andmetrics(duration, messageCount) - Tried
page=1,page=2,pageSize=100- no change in results - Response always returns
totalCountbut nonextPageTokenor similar cursor field
I can see the totalCount is correct, so the query is working. But I can’t get past the first batch of results. Is there a specific header or parameter I’m missing? Or is this endpoint just limited to returning a single page of results, which seems unlikely given the volume of data we’re dealing with?
Any pointers on the correct pagination mechanism would be appreciated. I’ve been stuck on this for a couple of days.