Skip to content
Igor Balos edited this page Oct 29, 2018 · 1 revision

For these API requests you will need to use a server API token. Once you obtain it, you will need to use server API client.

let postmark = require("postmark")
const serverToken = "xxxx-xxxxx-xxxx-xxxxx-xxxxxx"
let client = new postmark.ServerClient(serverToken);

Retrieve server

client.getServer().then(result => {
    console.log(result.ApiTokens);
});

Update server details

client.editServer({Color:"blues"}).then(result => {
    console.log(result.Color);
});