Autoresponder stats
This method returns the opens, clicks, bounces, complaints and unsubscribes of one autoresponder email, counted the same way as its report in the app.
URL
https://dashboard.skry.be/api/autoresponders/autoresponder-stats.php
PARAMETERS(POST)
api_keyyour API key.email_idthe numeric id of the autoresponder email, as returned inemail_listby Get autoresponder emails.
RESPONSE (JSON)
Success:
{
"id": 41,
"autoresponder_id": 3,
"recipients": 1874,
"opens": {
"total": 1502,
"unique": 1033,
"rate": 55.69
},
"clicks": {
"total": 388,
"unique": 251,
"rate": 13.39
},
"bounces": {
"hard": 19,
"soft": 7
},
"complaints": 1,
"unsubscribes": 12,
"links": [
{
"url": "https://acme.com/start",
"clicks": 301,
"unique_clicks": 198
},
{
"url": "https://acme.com/pricing",
"clicks": 87,
"unique_clicks": 61
}
]
}
recipientshow many people the email has been sent toopenstotalopens,uniqueopeners, andrate: unique openers as a percentage of delivered emails (recipients minus hard bounces), to two decimalsclickstotalclicks,uniqueclickers, andrate: unique clickers as a percentage of recipientsbounceshardandsoftbouncescomplaintsandunsubscribesattributed to this emaillinkseach tracked link with itsclicksandunique_clicks
Error: No data passed
Error: API key not passed
Error: Invalid API key
Error: Brand does not exist
Error: Email ID not passed
Error: Autoresponder email does not exist
An email that belongs to another brand is reported as Autoresponder email does not exist.
EXAMPLES
Example request in JavaScript with fetch API
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("api_key", "<YOUR_API_KEY>");
urlencoded.append("email_id", "41");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://dashboard.skry.be/api/autoresponders/autoresponder-stats.php", requestOptions)
.then(response => response.text())
// Success is JSON; errors are plain text
.then(text => {
try { console.log(JSON.parse(text)); }
catch (e) { console.log('error', text); }
})
.catch(error => console.log('error', error));
Example request in JavaScript with axios
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'api_key': '<YOUR_API_KEY>',
'email_id': '41'
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://dashboard.skry.be/api/autoresponders/autoresponder-stats.php',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});