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

notify-africa

v0.1.1

Published

SMS, WhatsApp, Voice, AI Chatbots, and CRM - all in one powerful platform designed for businesses across Africa.

Readme

Notify Africa SDK

npm version License: MIT

SMS, WhatsApp, Voice, AI Chatbots, and CRM - all in one powerful platform designed for businesses across Africa.

This is a TypeScript/JavaScript SDK for interacting with the Notify Africa API, focusing on SMS messaging features. It provides a simple class-based interface for sending single or batch SMS messages and checking message status. Built with native fetch for zero external dependencies (requires Node.js >= 18.0.0).

Features

  • Send single SMS messages
  • Send batch SMS messages to multiple recipients
  • Check the status of sent messages
  • Configurable base URL (defaults to https://api.notify.africa)
  • TypeScript support with full type definitions
  • No external dependencies

Installation

Install the package via npm:

npm install notify-africa

Or via yarn:

yarn add notify-africa

Usage

Import and Initialize

import { NotifyAfricaSMS } from 'notify-africa';

const apiToken = 'your-api-token-here'; // Replace with your Notify Africa API token
const client = new NotifyAfricaSMS(apiToken); // Uses default base URL: https://api.notify.africa

Send a Single Message

async function sendSingle() {
  try {
    const response = await client.sendSingleMessage(
      '255689737459', // Phone number
      'Hello from Notify Africa SDK!', // Message
      '137' // Sender ID
    );
    console.log('Single message sent:', response); // { messageId: '156023', status: 'PROCESSING' }
  } catch (error) {
    console.error('Error:', error.message);
  }
}

sendSingle();

Send Batch Messages

async function sendBatch() {
  try {
    const response = await client.sendBatchMessages(
      ['255763765548', '255689737839'], // Array of phone numbers
      'Test batch message', // Message
      '137' // Sender ID
    );
    console.log('Batch messages sent:', response); // { messageCount: 2, creditsDeducted: 2, remainingBalance: 1475 }
  } catch (error) {
    console.error('Error:', error.message);
  }
}

sendBatch();

Check Message Status

async function checkStatus() {
  try {
    const response = await client.checkMessageStatus('156022'); // Message ID
    console.log('Message status:', response); // { messageId: '156022', status: 'SENT', sentAt: null, deliveredAt: '2025-11-13T12:34:08.540Z' }
  } catch (error) {
    console.error('Error:', error.message);
  }
}

checkStatus();

API Reference

Constructor

new NotifyAfricaSMS(apiToken: string, baseUrl?: string)
  • apiToken: Your Notify Africa API bearer token (required).
  • baseUrl: Optional base URL for the API (defaults to 'https://api.notify.africa').

Methods

  • sendSingleMessage(phoneNumber: string, message: string, senderId: string): Promise<SendSingleResponse>

    • Sends a single SMS.
    • Returns: { messageId: string, status: string }
  • sendBatchMessages(phoneNumbers: string[], message: string, senderId: string): Promise<SendBatchResponse>

    • Sends SMS to multiple recipients.
    • Returns: { messageCount: number, creditsDeducted: number, remainingBalance: number }
  • checkMessageStatus(messageId: string): Promise<MessageStatusResponse>

    • Retrieves the status of a message.
    • Returns: { messageId: string, status: string, sentAt: string | null, deliveredAt: string | null }

All methods are asynchronous and throw errors on failure.

Integration with Frameworks

NestJS Example

Create a service:

import { Injectable } from '@nestjs/common';
import { NotifyAfricaSMS } from 'notify-africa';

@Injectable()
export class SmsService {
  private client: NotifyAfricaSMS;

  constructor() {
    this.client = new NotifyAfricaSMS(process.env.NOTIFY_AFRICA_TOKEN);
  }

  async sendSingle(phone: string, message: string, senderId: string) {
    return this.client.sendSingleMessage(phone, message, senderId);
  }

  // Add other methods as needed
}

Requirements

  • Node.js >= 18.0.0 (for native fetch support)

Development

  • Clone the repo: git clone https://github.com/tacherasasi/notify-africa.git
  • Install dependencies: npm install
  • Build: npm run build
  • Test: npm run test

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

MIT License. See LICENSE for details.

Support

For API-related questions, visit the Notify Africa Developers Portal.

Author: Tachera Sasi [email protected] (https://tachera.ekilie.com)