Does anyone understand why the Genesys Cloud Analytics API is rejecting our custom metric aggregation payload? We are running this via a GitHub Actions workflow using the official REST API endpoints, not CLI.
Error: 400 Bad Request - Invalid aggregation type for custom metric
The request targets /api/v2/analytics/conversations/summary. We are trying to aggregate a custom metric defined in the analytics settings. The metric exists and is visible in the UI. However, the API throws a 400 error when we include it in the aggregations array with type sum.
Payload snippet:
{
"aggregations": [
{
"type": "sum",
"id": "custom_metric_12345"
}
],
"dateFrom": "2023-10-01T00:00:00.000Z",
"dateTo": "2023-10-02T00:00:00.000Z"
}
This works for standard metrics like talkTime or holdTime. The custom metric ID is correct, verified via the GET /api/v2/analytics/conversations/metrics endpoint. Environment is AU-1 BYOC. Is there a limitation on aggregating custom metrics via the summary endpoint, or is this a known bug in the current API version? Need to fix this before the next deployment cycle.