Messages stats resource#
Required API Scopes: account_management
Overview#
This endpoint allows you to get detailed information about sent messages.
Get activity report#
Get recipient’s activity report in a specific period of time.
Available querystring parameters:
date- date for fetched stats (date format ‘yyyy-mm-dd’)offset- offset for fetching next batch of data (limit is 1000 ~ offset should be computed by adding this limit)
If
date parameter is not provided, activity from the day before will be retrieved.The
date parameter must be a valid date between the request date and up to 15 days ago.In order to use this endpoint, you must login to your sendmachine account, navigate to webhooks page (my account -> settings -> webhooks) and enable the Log message activity option.
Request
GET /messages_stats/activity_report
Response
One batch of data (activity_list) will be returned. If activity_list is false, there’s no more data to fetch.
{
"activity_list": [
{
"email_type": "campaign",
"campaign_name": "Campaign Name",
"customer_email": "customer@example.com",
"sender_email": "sender@example.com",
"subject_email": "Subject of the email",
"campaign_date": "2023-01-01T00:00:00Z",
"state": "opened",
"state_date": "2023-01-01T00:00:00Z",
"clicked_link": "https://example.com",
"click_count": 1,
"open_count": 1,
"device": "desktop",
"device_email_client": "Email Client",
"location": "Location"
}
]
}