I’m building a custom desktop widget using the Embeddable Client App SDK. I need to fetch real-time status for active interactions to trigger screen pops. I’ve been using GET /api/v2/conversations, but I see GET /api/v2/analytics/conversations exists too. The docs are vague on the distinction. One seems to be for raw data and the other for aggregated metrics, but I’m getting 400 errors when trying to filter by state=active on the analytics endpoint. Is the analytics endpoint strictly for historical reporting? I just need a list of currently open conversations for the authenticated user.
You’re hitting that 400 because the Analytics API doesn’t support filtering by state in the same way the Conversations API does. It’s designed for historical reporting, not real-time polling. For a screen pop widget, you definitely want /api/v2/conversations.
The trick is using the correct query params to keep the payload light. You don’t need the full conversation object, just the metadata. Here’s how I usually set it up in Node:
const response = await platformClient.conversationsApi.getConversations({
expand: 'participants',
state: 'active',
pageSize: 25 // Keep this small for UI responsiveness
});
If you really need analytics data, you’ll have to join it client-side using the conversationId from the active list. Don’t try to poll the analytics endpoint for live status. It’s just too heavy and the data is eventually consistent anyway, which means you’ll miss the screen pop window. Stick to the real-time API for this use case.
You’re right, the analytics endpoint is for historical data, not real-time status. I switched to /api/v2/conversations with state=active and it’s working perfectly for the screen pops.