Messaging Insights API Reference

With the Messaging Insights API, you can programatically retrieve the same information that appears in the Page Insights tab of your Facebook Page.

For more information about the Messaging Insights API and other analytics available from the Messenger Platform, see Analytics.

For more information about the Pages Insights API, including information on other metrics available and the permissions required, please see the Pages Insights docs or the Insights object reference.

Contents

Request URI

https://graph.facebook.com/v2.8/me/insights/?access_token=<PAGE_ACCESS_TOKEN>

Request Parameters

Parameter Description

metrics

A comma-separated list of metrics to return.

since

Optional. UNIX timestamp of the start time to get the metric for.

until

Optional. UNIX timestamp of the end time to get the metric for.

Response Properties

Property Type Description

data

Array

The response payload.

data.name

String

The long name of the returned report.

data.values

Array<value>

The available action counts by day.

value

Integer | Object

The count for the requested metric. For metrics that breakdown by type, an object containing counts for each type will be returned.

end_time

String

UTC timestamp of the end time for the metric.

Available Metrics

The following metrics are available via with Messaging Insights API:

MetricDescription

page_messages_active_threads_unique

Daily unique active conversations count.

page_messages_blocked_conversations_unique

The number of conversations with the Page that have been blocked.

page_messages_reported_conversations_unique

The number of conversations from your Page that have been reported by people for reasons such as spam, or containing inappropriate content.

page_messages_reported_conversations_by_report_type_unique

The number of conversations from your Page that have been reported by people for reasons such as spam, or containing inappropriate content. broken down by report type:

  • SPAM
  • INAPPROPRIATE
  • OTHER

page_messages_feedback_by_action_unique

Deprecated

page_messages_feedback_by_action_unique is deprecated as of November 7, 2017.

This metric will be removed in Graph API v2.12.

Please migrate your code to use our other Messaging Insights metrics, which provide comparable information.

Daily unique conversation counts broken down by user feedback actions, including

  • messaging turn-ons
  • messaging turn-offs
  • thread deletions
  • report spams
  • others

Example Request

curl -X GET "https://graph.facebook.com/v2.8/me/insights/?metric=<LIST_OF_METRICS>&access_token=<PAGE_ACCESS_TOKEN>"

Example Response

{ 
  "data": [ 
    { 
      "name": "<METRIC>", 
      "period": "day", 
      "values": [ 
        { 
          "value": "<VALUE>", 
          "end_time": "<UTC_TIMESTAMP>" 
        }, 
        { 
          "value": "<VALUE>", 
          "end_time": "<UTC_TIMESTAMP>" 
        }
     ]
    } 
  ],
}