Subscription status
This method gets the current status of a subscriber in a list (eg. subscribed, unsubscribed, bounced, complained).
URL
https://dashboard.skry.be/api/subscribers/subscription-status.php
PARAMETERS(POST)
api_keyyour API key: a brand key, or the main account key, which reaches lists in every brand it owns.emailthe subscriber's email address.list_idthe encrypted id of a list in your API key's brand. It can be found under View all lists in the column named ID, or in theidreturned by Get lists.
RESPONSE (Plain text)
Success: one of Subscribed, Unconfirmed, Unsubscribed, Bounced, Soft bounced or Complained.
Error: No data passed
Error: API key not passed
Error: Invalid API key
Error: Email not passed
Error: List ID not passed
Error: List does not exist (also returned for a list in another brand)
Error: Email does not exist in list
When more than one applies, the first match in this order wins: Unconfirmed, Unsubscribed, Bounced, then Complained or Soft bounced. A subscriber who has soft-bounced is no longer reported as Subscribed.
A list_id that can't be decoded is reported as List ID not passed.
EXAMPLES
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", "jane@example.com");
urlencoded.append("list_id", "<LIST_ID>");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://dashboard.skry.be/api/subscribers/subscription-status.php", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'api_key': '<YOUR_API_KEY>',
'email': 'jane@example.com',
'list_id': '<LIST_ID>'
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://dashboard.skry.be/api/subscribers/subscription-status.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);
});