Trying to figure out the exact difference between these two endpoints. I need to pull conversation metrics for a specific user, but the data looks different depending on which API I hit.
Using /api/v2/conversations gives me real-time state and basic details. It’s fast. But when I need historical stats like talk time, I’m supposed to use /api/v2/analytics/conversations. The problem is the analytics endpoint requires a time range query and returns aggregated data, not individual conversation objects.
Here’s the snippet I’m using for the analytics call:
const response = await client.analyticsApi.postAnalyticsConversationsQuery({
body: {
entity: {
type: 'user',
id: 'user-123'
},
interval: 'P1D',
groupBy: ['conversation']
}
});
The response is a list of intervals with metrics. It doesn’t give me the id of the conversation to look up more details later. Is there a way to get the conversation IDs from the analytics endpoint? Or do I have to query /api/v2/conversations first and then join the data manually? The docs aren’t clear on how these two fit together for a complete audit trail.