Skip to content

Instantly share code, notes, and snippets.

@arthurio
Last active August 29, 2015 14:01
Show Gist options
  • Save arthurio/6204a95bd3f33eacc57d to your computer and use it in GitHub Desktop.
Save arthurio/6204a95bd3f33eacc57d to your computer and use it in GitHub Desktop.
Javascript snippet to call the Bronto referral API
PT.api.call('/bronto/referral', {
method: 'post',
data: {
message: 'Example of message',
emails: ['example1@punchtab.com', 'example2@punchtab.com']
// OR emails: 'example1@punchtab.com,example2@punchtab.com'
},
success: function (response) {
console.log('OK');
},
error: function (response) {
console.log('Not OK', response);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment