npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

yournotify-node-sdk

v1.0.3

Published

NPM SDK for Yournotify API. Send email and sms marketing campaigns with ease.

Readme

Yournotify Node SDK

Installation

Install the Yournotify Node.js SDK using npm:

npm install yournotify-node-sdk

Usage

First, import the Yournotify class and initialize it with your API key.

import Yournotify from "yournotify-node-sdk";

const apiKey = "your_api_key_here";
const yournotify = new Yournotify(apiKey);

Sending an Email

yournotify
    .sendEmail(
        "Awesome Campaign", // name
        "[email protected]", // from
        "Subject", // subject
        "<h1>Hello</h1>", // html
        "Hello", // text
        "running", // status
        ["[email protected]"] // to
    )
    .then((response) => {
        console.log(response.status); // success or failed
        console.log(response.data.id); // Campaign ID
    });

Sending an SMS

yournotify
    .sendSMS(
        "Awesome Campaign", // name
        "sender_id", // from
        "Hello world!", // text
        "running", // status
        ["+2348100000000"] // to
    )
    .then((response) => {
        console.log(response.status); // success or failed
        console.log(response.data.id); // Campaign ID
    });

Adding a Contact

yournotify
    .addContact(
        "[email protected]",
        "+2348100000000",
        "list_id",
        "Contact Name",
        { key: "value" }
    )
    .then((response) => {
        console.log(response.status);
        console.log(response.data.id); // Contact ID
    });

Getting All Contacts

yournotify.getContacts().then((response) => {
    console.log(response.status);
    console.log(response.data); // List of contacts
});

Deleting a Contact

yournotify.deleteContact(123).then((response) => {
    console.log(response.status); // success or failed
});

Adding a List

yournotify.addList("List Title", "type", "optin").then((response) => {
    console.log(response.status);
    console.log(response.data.id); // List ID
});

Getting All Lists

yournotify.getLists().then((response) => {
    console.log(response.status);
    console.log(response.data); // List of lists
});

Deleting a List

yournotify.deleteList(456).then((response) => {
    console.log(response.status); // success or failed
});

Deleting a Campaign

yournotify.deleteCampaign(789).then((response) => {
    console.log(response.status); // success or failed
});

Getting Campaign Stats

yournotify.getCampaignStats(123, "email").then((response) => {
    console.log(response.status);
    console.log(response.data); // Campaign stats
});

Getting Campaign Reports

yournotify.getCampaignReports(123, "sms").then((response) => {
    console.log(response.status);
    console.log(response.data); // Campaign reports
});

Getting Your Profile

yournotify.getProfile().then((response) => {
    console.log(response.status);
    console.log(response.data); // Profile information
});

API Methods Reference

API Methods

Email

  • sendEmail(name, from, subject, html, text, status, to)
    Sends an email campaign.

SMS

  • sendSMS(name, from, text, status, to)
    Sends an SMS campaign.
    • to: Accepts either:
      • An array of phone number strings
        Example:
        ["+2348100000000", "+2348100000001"];
      • An array of objects
        Example:
        [
            {
                telephone: "+2348100000000",
                name: "Recipient One",
                attribs: { key: "value" }, // optional
            },
            {
                telephone: "+2348100000001",
                name: "Recipient Two",
                attribs: { key: "value2" }, // optional
            },
        ];

Contacts

  • addContact(email, telephone, list, name, attribs)
    Adds a contact to a list.
  • getContact(id)
    Retrieves a contact by ID.
  • getContacts()
    Retrieves all contacts.
  • deleteContact(id)
    Deletes a contact by ID.

Lists

  • addList(title, type, optin)
    Creates a new list.
  • getList(id)
    Retrieves a list by ID.
  • getLists()
    Retrieves all lists.
  • deleteList(id)
    Deletes a list by ID.

Campaigns

  • deleteCampaign(id)
    Deletes a campaign by ID.
  • getCampaignStats(ids, channel)
    Retrieves campaign statistics for one or more campaign IDs.
    • channel: "email" or "sms"
  • getCampaignReports(ids, channel)
    Retrieves campaign reports for one or more campaign IDs.
    • channel: "email" or "sms"

Profile

  • getProfile()
    Retrieves your profile information, including account credits and related data.

More Information

For full API reference, visit the Yournotify API Documentation.


License

This SDK is open-source and available under the MIT License.