Hi Oscar,
When filtering conversation details by userId using the /api/v2/analytics/conversations/details/query endpoint, you should use segmentFilters instead of the top-level filter. Additionally, ensure you remove the granularity field, as it's intended for aggregate queries, not detail queries. Finally, increase your pageSize (e.g., to 100) and implement logic in your application to loop through pageNumbers to retrieve all matching results, as the default or a low page size will only return a small subset.
Here's an example request body incorporating these changes:
{
"interval": "2025-03-17T00:00:00.000Z/2025-03-31T23:59:59.999Z",
"order": "asc", // Optional: Or "desc"
"orderBy": "conversationStart", // Optional: Or another valid field
"paging": {
"pageSize": 100,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "userId",
"operator": "matches",
"value": "dd7534e5-7303-43a0-9450-5fed9924c0dc"
}
]
}
]
}
Remember to handle the pagination by incrementing pageNumber in subsequent requests until no more results are returned.