Instance
Read Metrics
Returns aggregated message counters for one or several instances
GET
Read Metrics
Auth:
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: yes
Description
Returns message counters (total, by type, by status, last 7/30 days, unique contacts, etc.) for an instance or a consolidated set of several at once.How it works
The:instance parameter accepts two formats:
- A single instance:
/metrics/salesreturns its metrics - Multiple instances:
/metrics/sales,support,marketingreturns a single object with the values summed across them
instance field of the response brings the original list.
Examples
One instance
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.Multiple (consolidated)
Passing several names separated by comma returns a single object with numeric values summed across instances. Useful for aggregated views per department or account.Path parameters
Single name (e.g.,
sales) or comma-separated list (e.g., sales,support). Spaces around commas are accepted.Headers
TokenAccount or TokenInstance.
Success response
- One instance
- Multiple (consolidated)
200 OK
Response fields
| Field | What it is |
|---|---|
totalMessages | Total messages sent + received |
messagesReceived / messagesSent | Breakdown by direction |
messagesByType | Count by type (text, image, audio, video, document, sticker, etc.) |
groupMessages / individualMessages | Group vs 1-to-1 breakdown |
messagesWithMedia | How many had attached media |
mediaByType | Media count by type |
messagesByStatus | Status breakdown (pending, sent, delivered, read, played, failed) |
uniqueChats / uniqueGroups / uniqueContacts | Unique counts |
messagesLast7Days / messagesLast30Days | Recency |
firstMessageAt / lastMessageAt | Edge dates |
Errors
| HTTP | Condition |
|---|---|
| 400 | Empty path or only commas |
| 401 | Token missing or invalid |
| 404 | Any instance in the list does not exist |
| 429 | More than 100 requests per minute |
Notes
If the instance has
ignoreGroupMessages active, group messages are not counted, groupMessages may appear as 0.Next
List instances
Current connection state and integrations summary.
Update settings
Adjust behavior flags such as
ignoreGroupMessages.