Node library for the Notifuse API
Notifuse connects all your notification channels (SenGrid, Mailgun, Twilio SMS, Slack, push...) to a powerful API/platform that handles templating, contacts segmentation and smart campaigns.
We recommend you to read the API Reference to understand the behavior and results of every methods.
Installation
npm install notifuse --save
Usage
var Notifuse = client = API_KEY options;
Client options
Key | Expected value. |
---|---|
timeout | Request timeout in ms. Default 5000. |
maxAttempts | Max retry attempts. Default 5. |
retryDelay | Delay between retry attempts in ms. Default 250. |
agent | Https agent for the requests. |
Upsert contacts
// upsert an array of contacts var myContact = id: '123' profile: $set: firstName: 'John' lastName: 'Doe' ; clientcontacts; // same with a promise clientcontacts;
Send messages
var Notifuse = client = API_KEY; var myMessage = notification: 'welcome' channel: 'sendgrid-acme' template: 'v1' contact: '123' contactProfile: $set: firstName: 'John' lastName: 'Doe' templateData: _verificationToken: 'xxx' ; clientmessages; // same with a promise clientmessages;
Retrieve a message
var Notifuse = client = API_KEY; var myMessageId = 'xxxxxxxxxxxxxxxx'; clientmessages; // same with a promise clientmessages;
Support
Feel free to create a new Github issue if it concerns this library, otherwise use our contact form.
Copyright
Copyright © Notifuse, Inc. MIT License; see LICENSE for further details.