How to get KPIs and metrics from the Benchmark API
In this article we will explain how we get your metrics data from Benchmark to display in MinimalDashboard, but if you want to use this data in your own application you can either use our API or follow the instructions below to write your own implementation.
Benchmark is an email marketing service offering user-friendly tools for creating, automating, and analyzing email campaigns effectively with an extensive API giving you access to your contact lists and corresponding statistics. You can find their documentation here: Benchmark's API.
Contents
Authentication
To access the Benchmark API go to your integration page in the Benchmark dashboard. When you first open the page, the “Copy Key” is visible, but doesn’t actually copy any key. Find the small print that reads “Your unique API key allows other sites and applications to access your Benchmark Email account. If you need to regenerate this key, click here.” and click the link within to generate your key.
Then you can copy the key and add a header called “AuthToken” to pass it into any request.
Endpoint
The primary endpoint to get list statistics is
https://clientapi.benchmarkemail.com/Contact/<list-id>/ContactSummary
To get your list-id (in Benchmark they are called “list of contacts”) you can request a collection of all your lists from this endpoint:
https://clientapi.benchmarkemail.com/Contact/
Note
the trailing slash is required on this endpoint. Without you will run into a server error. This is not the case for the ContactSummary endpoint where adding a trailing slash will cause a server error
You currently can’t get historic data for contacts.
How to get your active subscribers count from Email Octopus
To get all contacts send a GET request to and specify the status:
https://clientapi.benchmarkemail.com/Contact/<list-id>/ContactSummary
This will return a list object with a Response.Data
property containing the list metrics:
{
"Response": {
"Data": {
"ActiveContactCount": "2",
"BounceContactCount": "0",
"HardContactCount": "0",
"NotOptinContactCount": "0",
"OptinContactCount": "1",
"SoftContactCount": "0",
"UnsubscribeContactCount": "0"
},
"Errors": [],
"Status": "1"
}
}
Your active subscriber count is in ActiveContactCount
.
Looking for more?
Have a look at our API knowledge base with many more services...
Benchmark
Email Marketing
If you'd like to have a ready-made dashboard with all the metrics from Benchmark instead, you can create one with MinimalDashboard in a few clicks.
Create dashboards to show
- Subscriber Count
- Unsubscriber Count