I’m completely stumped as to why the POST /api/v2/analytics/interactions/queries endpoint returns a 400 Bad Request when filtering by our AP-Southeast-1 BYOC trunk IDs for digital messaging sessions. The payload structure matches the documentation for voice interactions, but the response indicates that the metric scope is invalid for the specified channel type. We are managing 15 BYOC trunks across multiple regions, and this issue is specific to the digital channels (WhatsApp and SMS) routed through our Singapore-based trunk configuration. The same query works perfectly for PSTN lines in US-East, suggesting a regional or channel-specific limitation in the analytics engine.
The error response includes the message “Invalid metric scope for channel type digital” and points to the time range and metric definitions in the request body. We have verified that the SIP registration and failover logic are functioning correctly, with no dropped calls or registration failures reported by the carrier. The outbound routing rules are configured to prioritize the AP-Southeast-1 trunks for digital messages, and the number management settings are consistent across all trunks. Despite this, the analytics API refuses to process the query, causing a gap in our reporting pipeline. We need to understand if there is a known limitation with BYOC trunks in the AP-Southeast-1 region for digital channel analytics or if the API requires a different payload structure for messaging interactions. Any insights into the correct metric scope or alternative endpoints for querying digital channel data would be greatly appreciated.