Node.js SDK
TypeScript SDK for Node.js. Install via npm, place calls with client.calls.create(). Preview; pin your version.
The Sautikit Node.js SDK is a TypeScript-first client for placing calls, checking call status, and managing phone numbers. It exports both ES modules and CommonJS, supports top-level await, and runs in Node.js 18+ and modern browsers.
npm install @sautikit/nodeOr with Yarn:
yarn add @sautikit/nodeOr with pnpm:
pnpm add @sautikit/nodePlace an outbound call and get the call ID back:
import { SautikitClient } from "@sautikit/node";
const client = new SautikitClient({
apiKey: process.env.SAUTIKIT_API_KEY,
});
const call = await client.calls.create({
from: "+254712345678",
to: ["+254700000001"],
});
console.log(`Call placed. ID: ${call.call_id}, Status: ${call.status}`);The response includes:
{
"call_id": "9d2b1f53-8c0e-4f1d-9a6b-5d3a8c47e9f0",
"session_id": "HD_1a2b3c",
"status": "ringing"
}The SDK reads your API key from the SAUTIKIT_API_KEY environment variable by default:
export SAUTIKIT_API_KEY="eyJ..."Or pass it directly to the constructor:
const client = new SautikitClient({
apiKey: "eyJ...",
});Put a supervisor on a live call, switch between listen, whisper and barge, and take them off again. Your API key needs the calls.supervise scope (calls.read for getSupervision):
const sup = await client.calls.supervise("HD_24d73b4518bc", {
mode: "listen",
supervisor: { type: "phone", number: "+254700000002" },
label: "Mary Wanjiku",
});
// Later, once the supervisor has answered (call.supervision.started):
await client.calls.setSupervisionMode(sup.call_id, "whisper");
// When they are done:
await client.calls.stopSupervision(sup.call_id);A mode change before the supervisor answers gets 409 calls.supervisor_not_connected.
calls.getSupervision(callId) returns the active supervision or null. The full walkthrough, including a browser supervisor, is in Supervise live calls.
client.webrtc.mintToken() and hand it to @sautikit/webrtcPreview: semver pinning recommended. The SDK's public API may change before v1.0. Pin your version in package.json:
{
"dependencies": {
"@sautikit/node": "0.x.y"
}
}Subscribe to releases on GitHub to stay informed of breaking changes.