A single instance: /metrics/sales returns its metrics
Multiple instances: /metrics/sales,support,marketing returns a single object with the values summed across them
When you pass several, numeric values are summed, timestamps return the smallest/largest (first message / last message), and the instance field of the response brings the original list.
Passing a single name in the path returns the metrics of that instance in isolation, ideal for individual dashboards or for reading statistics of a specific number.
curl -X GET "https://ryzeapi.cloud/api/instance/metrics/sales" \ -H "token: $Token_Instance"
Passing several names separated by comma returns a single object with numeric values summed across instances. Useful for aggregated views per department or account.
curl -X GET "https://ryzeapi.cloud/api/instance/metrics/sales,support,marketing" \ -H "token: $Token_Account"
If the instance has ignoreGroupMessages active, group messages are not counted, groupMessages may appear as 0.
For high-frequency dashboards, consider storing the values on your side, each call performs full computations and can take time on instances with high volume.