Official Node.js client for the smsroute.cc SMS API — send SMS to 150+ countries.
npm install smsrouteconst { SmsRoute } = require('smsroute');
const sms = new SmsRoute({ apiKey: process.env.SMSROUTE_API_KEY });
const res = await sms.send({
to: '+447700900000', // E.164
from: 'MyBrand', // alphanumeric sender ID (see country rules below)
text: 'Your code is 123456',
});
console.log(res);| Method | Purpose |
|---|---|
send({ to, from, text }) |
send one message |
status(id) |
delivery status for a message |
balance() |
account balance |
Errors throw SmsRouteError with .status and .body. Requests time out at 15s (timeoutMs).
Alphanumeric sender IDs need pre-registration in many countries (and are banned in some). Open dataset of the rules: sms-sender-id-regulations.
- Docs & pricing: https://www.smsroute.cc
- Issues: https://github.com/SMSRoute-cc/smsroute-node/issues
MIT licensed.