Data Removal - ActiveCampaign/postmark.js GitHub Wiki
For these API requests you will need to use a account API token. Once you obtain it, you will need to use account API client.
let postmark = require("postmark")
const accountToken = "xxxx-xxxxx-xxxx-xxxxx-xxxxxx"
let client = new postmark.AccountClient(accountToken);
Request data removal
client.requestDataRemoval({
RequestedFor: "[email protected]",
RequestedBy: "[email protected]",
NotifyWhenCompleted: true}).then( result => {
console.log(result.ID);
console.log(result.Status);
});
Retrieve data removal details
client.getDataRemovalStatus(1).then(result => {
console.log(result.ID);
console.log(result.Status);
});