Messages stats

Overview

This endpoint allows you to get detalied 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_name",
            "customer_email",
            "sender_email",
            "subject_email",
            "campaign_date",
            "state",
            "state_date",
            "clicked_link", // key available only if state is "clicked"
            "click_count", // key available only if state is "clicked"
            "open_count" // key available only if state is "opened"
            "device" // key available only if state is "opened"
            "device_email_client" // key available only if state is "opened"
            "location" // key available only if state is "opened"
        }
    ]
}