POST /api/v2/analytics/conversations/aggregates
Status: 400 Bad Request
Error: “The request contains an invalid query parameter.”
I’m trying to build a custom interval report to correlate our OTel trace IDs with conversation handle times. The goal is to aggregate data every 15 minutes so we can map specific trace spans to high-latency intervals. Here’s the payload I’m sending:
{
"dateFrom": "2023-10-01T00:00:00Z",
"dateTo": "2023-10-01T01:00:00Z",
"groupBy": ["interval"],
"interval": "PT15M",
"metrics": [
{
"id": "handleTime",
"type": "sum"
}
],
"filter": {
"type": "and",
"clauses": [
{
"dimension": "queueId",
"type": "in",
"values": ["queue-id-123"]
}
]
}
}
The docs say interval should work with groupBy: ["interval"]. I’ve verified the queueId exists. The error doesn’t specify which parameter is invalid. Is there a restriction on using custom intervals with specific metric types? Or am I missing a required field for the aggregation query? We’ve tried removing the filter clause but the 400 persists. Need this to work before our next sprint review.