Objective
If you encounter errors when adding the groupBy parameter, this guide explains how to correctly format it when using the Public API endpoints for Delivery Overview. Whether you are using the API tester, cURL, or the Segment Public API SDK, these steps will help you resolve the issue and format the value correctly.
Product
Twilio Segment
Environment
Segment Console
User Account Permission/Role(s) Required
Access to a Segment workspace and permission to use the Segment Public API.
Procedure
/delivery-overview endpoints and you want to use the groupBy parameter, you must format its value as a JSON array. For example:
-
To group by
eventName, set the parameter as:["eventName"]. -
If you want to group by multiple fields, include them as comma-separated strings within the array:
["eventName", "anotherField"].
Additional Information
-
In the Segment Public API tester: Locate the
groupByfield and enter the value as a JSON array (e.g.,["eventName"]). If grouping by more than one field, add each field within the same array.- Note: Using repeated query parameters or the 'Add item' button in the API tester will not work unless the value is formatted as a JSON array.
-
If using cURL or a direct API call: Ensure the
groupByparameter is passed as a JSON array string.