20. API get thống kê tin nhắn gửi ra của nhân viên theo từng ngày
Last updated
{
"success": true,
"totalSent": 30,
"totalByDate": [
{ "date": "2026-03-20", "dateDisplay": "20/03/2026", "totalSent": 12 },
{ "date": "2026-03-21", "dateDisplay": "21/03/2026", "totalSent": 18 }
],
"users": [
{
"user": {
"_id": "67d8f7c81e8f98a1b2c3d4e5",
"firstname": "An",
"lastname": "Nguyen",
"email": "an.nguyen@example.com",
"avatar": "",
"displayName": "An Nguyen"
},
"totalSent": 16,
"byDate": [
{ "date": "2026-03-20", "dateDisplay": "20/03/2026", "totalSent": 7 },
{ "date": "2026-03-21", "dateDisplay": "21/03/2026", "totalSent": 9 }
]
}
]
}
curl --request GET \
'https://YOUR_DOMAIN/reports/omni/messages/sent-by-user-daily?startDate=2026-03-01T00:00:00.000Z&endDate=2026-03-27T23:59:59.999Z' \
--header 'apikey: YOUR_API_KEY'curl --request GET \
'https://YOUR_DOMAIN/reports/omni/messages/sent-by-user-daily
?startDate=2026-03-01T00:00:00.000Z
&endDate=2026-03-27T23:59:59.999Z
&pageIds=123456789,987654321
&channel=WHATSAPP
&userIds=67d8f7c81e8f98a1b2c3d4e5,67d8f7c81e8f98a1b2c3d4e6' \
--header 'apikey: YOUR_API_KEY'