News

The official Node.js library for Calisero is available

· 3 minutes read

The official Node.js library for Calisero is published and ready for production. It covers the whole API — messages, OTP verifications, opt-outs and account details — for any Node.js application, from an Express server to a background worker.

What it includes

Fully typed. Written in strict TypeScript, with its type declarations in the package. Your editor completes every option you send and every field the API answers with.

No dependencies. The library runs on the fetch built into Node.js: nothing else to install or audit. It works with import and with require().

OTP in two calls. Start a verification, then validate the code the user typed. Calisero generates, sends and checks the code, so your application never stores it.

Delivery webhooks. A ready handler for node:http and Express reads and validates every delivery report, then hands it to your code as a typed object. An optional secret token in the callback address turns away requests that do not carry it.

Clear errors. Every kind of failure has its own error class — invalid data, a rejected key, too many requests, a server error — carrying the API's message and the request's trace ID, the one support asks for.

Romania time handled. Pass a Date to schedule a message and the library converts it to the time zone the API expects.

URL shortening. Turn on link shortening for a message and track the clicks on its links.

Getting started

Install the package from npm:

npm install @calisero/calisero-node

Then send your first message with your API key:

import { SmsClient } from '@calisero/calisero-node';

const client = SmsClient.create(process.env.CALISERO_API_KEY);

const { data: message } = await client.messages.create({
    recipient: '+40742123456',
    body: 'Your order has shipped and arrives tomorrow.',
});

console.log(message.id, message.status);

A sandbox API key lets you try every call without sending or paying for real messages.

The library needs Node.js 20.19 or later and is tested on Node.js 20, 22, 24 and 26, on Linux, macOS and Windows. Its source code is public on GitHub, with runnable examples for every operation, and the integrations page lists the current version.

Keep the API key on the server: the library is meant for server-side code, never for a browser.

What comes next

The Symfony bundle launched the same day, so the integrations page now lists four official libraries: PHP, Laravel, Symfony and Node.js. Go and Python libraries are next and will appear on the same page when they launch.

Other relevant articles

All articles