analyze_whatsapp_chats
Reports and exports of the chats of a WhatsApp number.
Available actions:
statistics: the team's figures for a period (7 days by default, up to 92): new, resolved and reopened chats, messages received and sent, internal notes, average time to the first reply, to each reply, to resolve and to handle a chat, what was in the inbox at the end of the period, the most used labels and a day-by-day breakdown. Add compareFromDate and compareToDate to compare with an earlier period and get the change in percent. Days are cut at midnight in the account timezone, so for whole days pass local midnights with their offset. Times are in seconds. There is no breakdown per agent or per hour.
export: Export chats in JSON, CSV or TXT, filtered by status and date, paging through as many chats as requested
Use this tool for: weekly reports, response time reviews, backups, and feeding chat lists into another system.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of WhatsApp chats to export (max 1000, fetched in pages of 500) | |
| action | Yes | Chat analysis action to perform | |
| device | Yes | WhatsApp device ID connected to Wassenger (24 character hexadecimal string) | |
| fields | No | Explicit dot-path allowlist for the json format. Overrides verbosity when set. | |
| format | No | Export format | json |
| status | No | Export only: filter by chat status | |
| toDate | No | End of the period. Statistics: defaults to now. Export: only chats whose last message is before this date | |
| fromDate | No | Start of the period, e.g. 2026-09-11T00:00:00+02:00. Statistics: defaults to 7 days before toDate. Export: only chats whose last message is after this date | |
| verbosity | No | Response detail level for the json format | summary |
| compareToDate | No | Statistics only: end of the earlier period to compare with | |
| compareFromDate | No | Statistics only: start of an earlier period to compare with. Requires compareToDate |