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

callpro-sms

v1.0.0

Published

CallPro SMS (MessagePro) SDK for Node.js

Readme

callpro-sms

CallPro SMS (MessagePro) SDK for Node.js — send SMS, check delivery status, fetch messages, and run bulk campaigns via the CallPro API.

Installation

npm install callpro-sms

Quick Start

import { CallPro } from "callpro-sms";

const client = new CallPro({
  apiKey: "your-api-key",
  from: "your-registered-phone-number",
  endpoint: "https://api.callpro.mn/messagepro",
});

// Send an SMS
const result = await client.sendMessage("99112233", "Hello from CallPro!");
console.log(result["Message ID"]); // 12345

API Reference

new CallPro(config)

Create a new client instance.

| Parameter | Type | Description | | --- | --- | --- | | config.apiKey | string | Your CallPro API key | | config.from | string | Your registered sender phone number | | config.endpoint | string | CallPro API base URL |


sendMessage(to, text)

Send an SMS message to a single recipient.

const result = await client.sendMessage("99112233", "Your OTP is 1234");

Parameters:

| Name | Type | Description | | --- | --- | --- | | to | string | Recipient phone number | | text | string | Message content |

Returns: Promise<SendResponse>

{
  Result: "success",
  "Message ID": 12345,
  Reason?: "optional error reason"
}

getStatus(messageId)

Check the delivery status of a sent message.

const status = await client.getStatus("12345");

Parameters:

| Name | Type | Description | | --- | --- | --- | | messageId | string | The message ID returned from sendMessage |

Returns: Promise<GetStatusResponse>

{
  delivered: "yes",
  result: "success",
  source_number: "70001234",
  destination_number: "99112233",
  text: "Your OTP is 1234"
}

fetchMessage(from, text)

Fetch incoming messages.

const response = await client.fetchMessage("99112233", "CONFIRM");

Parameters:

| Name | Type | Description | | --- | --- | --- | | from | string | Sender phone number | | text | string | Message text to match |

Returns: Promise<string>


orderCampaign(campaign)

Send bulk SMS via a campaign.

// Same text to multiple numbers
await client.orderCampaign({
  name: "Promo Campaign",
  isWithText: 0,
  text: "Flash sale today!",
  from: "70001234",
  begin_date: "20260301",
  begin_hour: "09",
  begin_minute: "00",
  numbers: ["99112233", "99445566", "99778899"],
});

// Unique text per number
await client.orderCampaign({
  name: "OTP Campaign",
  isWithText: 1,
  text: "",
  from: "70001234",
  begin_date: "20260301",
  begin_hour: "09",
  begin_minute: "00",
  numbers: [
    { number: "99112233", text: "Your code is 1111" },
    { number: "99445566", text: "Your code is 2222" },
  ],
});

Parameters:

| Name | Type | Description | | --- | --- | --- | | campaign.name | string | Campaign name | | campaign.isWithText | 0 \| 1 | 0 = same text to all numbers, 1 = unique text per number | | campaign.text | string | Message text (used when isWithText is 0) | | campaign.from | string | Sender phone number | | campaign.begin_date | string | Start date in YYYYMMDD format | | campaign.begin_hour | string | Start hour (00-23) | | campaign.begin_minute | string | Start minute (00-59) | | campaign.numbers | string[] \| NumberData[] | Recipients — array of phone strings or { number, text } objects |

Returns: Promise<string>


TypeScript

All types are exported:

import type {
  CallProConfig,
  SendResponse,
  GetStatusResponse,
  OrderCampaignRequest,
  NumberData,
} from "callpro-sms";

Requirements

  • Node.js 18+ (uses native fetch)

License

ISC