Skip to content

convoso-jsTypeScript SDK for the Convoso API

Zero dependencies. Fully typed. Auto-pagination, retry, and hooks built in.

Convoso

Community project — not affiliated with Convoso

Quick Start

bash
npm install convoso-js
typescript
import { Convoso } from 'convoso-js';

const client = new Convoso({
  authToken: process.env.CONVOSO_TOKEN!,
  maxRetries: 3,
});

// Search leads
const { results } = await client.leads.search({ list_id: '333', limit: 100 });

// Auto-paginate through all DNC entries
for await (const entry of client.dnc.searchAll({ campaign_id: '500' })) {
  console.log(entry.phone_number);
}

// Monitor agents in real time
const monitor = await client.agentMonitor.search();
console.log(`${monitor.agents_ready} agents ready`);

Why convoso-js?

The Convoso API uses POST requests with URL-encoded bodies, returns inconsistent response shapes across endpoints, and has undocumented error codes. This SDK handles all of that:

  • Auth injectionauth_token added to every request automatically
  • Error code lookup — 44 known error codes with human-readable descriptions
  • Null/undefined stripping — cleaned from params before encoding
  • Response types — every endpoint response is fully typed, matching the API exactly
  • Dual format — ships ESM + CJS with .d.ts declarations

Community project — not affiliated with or endorsed by Convoso.