Sender signatures - 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 accountClient = new postmark.AccountClient(accountToken);
You can easily list and manage all sender signatures within your account.
Retrieve sender signatures
accountClient.getSenderSignatures().then(result => {
console.log(result.TotalCount);
console.log(result.SenderSignatures);
console.log(result.SenderSignatures[0].Domain);
});
Retrieve sender signature details
accountClient.getSenderSignature(1234567).then(result => {
console.log(result);
console.log(result.Confirmed);
console.log(result.Domain);
});
Create a new sender signature
accountClient.createSenderSignature({Name: "John Smith", FromEmail: "[email protected]"}).then(result => {
console.log(result);
});
Update sender signature
accountClient.editSenderSignature(1234567, { Name: "Michael Smith"}).then(result => {
console.log(result);
});
Delete existing sender signature
accountClient.deleteSenderSignature(1234567).then(result => {
console.log(result.Message);
});