varCleverReach=require('cleverreach-wrapper');// Login credentialsvarcr=newCleverReach({client_id: '123456',login: 'john.doe@foo.bar',password: 'abc123'});// Get all mailingscr.mailings().getAll().then(function(mailings){console.log(mailings);});// Get single mailing with specified IDcr.mailings().get(1234567).then(function(mailing){console.log(mailing);}).catch(function(error){console.log(error);})// Create new mailingvarnewMailing={'mailingData': {'name': 'This is the title','type': 'html/text','subject': 'subject line','sender_name': 'Bruce Whayne (Whayne corp.)','sender_email': 'bruce.whayne@gotham.com','group_id': '#','html': 'Newsletter Content','text': 'this is the Text only'}};cr.mailings().create(newMailing).then(function(mailing){console.log(mailing)});
API
You find detailed infos about the CleverReach REST API here