Skip to main content
Docs/Node.js SDK
SDK Reference

Node.js SDK

Official TypeScript SDK for the Staffify API. Zero runtime dependencies — uses native fetch and Node.js crypto. Ships ESM, CommonJS, and full .d.ts type declarations. Requires Node 18+.

Installation

bash

npm install staffify

Quick example

TypeScript

import Staffify from 'staffify';

const client = new Staffify({ apiKey: process.env.STAFFIFY_API_KEY });

const { data } = await client.agents.list();
console.log(data.agents);

What's included

agentsCreate, configure, and manage AI voice agents
callsList, inspect, and control active calls
phoneNumbersPurchase, assign, and manage phone numbers
addressesRegulatory address management for phone numbers
knowledgeBasesBuild and query knowledge bases for agents
webhooksManage org-level webhook endpoints
projectProject settings and project-level webhooks
orgMulti-project management with org keys
smsSend SMS messages from assigned numbers
usageQuery usage stats and cost breakdowns
voicesBrowse available voices by language
verifyFuzzy-match caller input against expected values
creditsCheck account balance and tier
testSessionsTest agents interactively without making real calls

TypeScript support

All methods are fully typed. Import types directly:

TypeScript

import type { Agent, Call, CreateAgentParams } from 'staffify';
Node.js SDK - Staffify