Skip to content
Last updated

Retrieve Statistics

Mailjet's API has a variety of resources that help retrieve aggregated statistics for key performance indicators like opens, clicks, unsubscribes, etc.

Here is a look at just one of those resources to give you a sample of the data you can read - we’ll retrieve total aggregated statistics for your API key.

Example

# Run :
curl -s \
	-X GET \
	--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
	https://api.mailjet.com/v3/REST/statcounters?CounterSource=APIKey\&CounterTiming=Message\&CounterResolution=Lifetime

API Response

{
  "Count": "1",
  "Data": [
    {
      "APIKeyID": "123456",
      "MessageClickedCount": "1",
      "MessageDeferredCount": "0",
      "MessageHardBouncedCount": "0",
      "MessageOpenedCount": "1",
      "MessageQueuedCount": "0",
      "MessageSentCount": "1",
      "MessageSoftBouncedCount": "0",
      "MessageSpamCount": "0",
      "MessageUnsubscribedCount": "0",
      "Total": "1"
      "........................."
    }
  ],
  "Total": "1"
}