Notify Africa API
Official SDKs

Notify Africa Official SDKs

Official SDKs for Notify Africa. Faster integrations for Node.js, Go, Python, and PHP.

Accelerate your integration using our SDKs instead of calling the REST API directly. SDKs wrap authentication, request formatting, and error handling for a smoother developer experience.

:::info Repositories


SDK Usage

Features

  • Send single SMS
  • Send batch SMS
  • Check message status
  • Configurable base URL (defaults to https://api.notify.africa)
  • TypeScript support, no external dependencies (uses native fetch, Node >= 18)

Installation

npm install notify-africa
# or
yarn add notify-africa
# or
pnpm add notify-africa

Quick Start (TypeScript/JavaScript)

import { NotifyAfrica } from 'notify-africa';

const notifyAfrica = new NotifyAfrica(
  process.env.NOTIFY_API_TOKEN || 'your-token-here'
);

async function run() {
  // Send a single message
  const single = await notifyAfrica.sendSingleMessage(
    '255689737459',
    'Hello from API Management endpoint!',
    '137'
  );
  console.log(single); // { messageId: '156023', status: 'PROCESSING' }

  // Send a batch
  const batch = await notifyAfrica.sendBatchMessages(
    ['255763765548', '255689737839'],
    'test',
    '137'
  );
  console.log(batch); // { messageCount: 2, creditsDeducted: 2, remainingBalance: 1475 }

  // Check status
  const status = await notifyAfrica.checkMessageStatus('156022');
  console.log(status); // { messageId: '156022', status: 'SENT', sentAt: null, deliveredAt: '2025-11-13T12:34:08.540Z' }
}

run().catch(console.error);

API Reference (summary)

// Constructor
new NotifyAfrica(apiToken: string, baseUrl?: string)
// - apiToken: your bearer token (required)
// - baseUrl: defaults to 'https://api.notify.africa'

// Methods
// - Sends a single SMS
sendSingleMessage(
  phoneNumber: string,
  message: string,
  senderId: string,
): Promise<{ messageId: string; status: string }>

// - Sends SMS to multiple recipients
sendBatchMessages(
  phoneNumbers: string[],
  message: string,
  senderId: string,
): Promise<{ messageCount: number; creditsDeducted: number; remainingBalance: number }>

// - Retrieves the status of a message
checkMessageStatus(
  messageId: string,
): Promise<{ messageId: string; status: string; sentAt: string | null; deliveredAt: string | null }>

:::note Requirements

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

View on GitHub


Support

On this page