Skip to content

Faxbot Node.js SDK

Thin Node.js client for the Faxbot API. Sends faxes and checks status via the unified Faxbot REST API (independent of the server's backend: Phaxio or SIP/Asterisk).

The current source package is proprietary and requires prior written permission from David Montgomery for use. Previously released MIT versions retain their existing permissions. See the license.

  • Package name: faxbot
  • Requires: Node.js 18+

Install

  • From npm (once published):
    npm install faxbot
    
  • From source (this repo):
    cd sdks/node
    npm install
    

Usage

const FaxbotClient = require('faxbot');
const client = new FaxbotClient('http://localhost:8080', 'YOUR_API_KEY');

async function run() {
  const job = await client.sendFax('+15551234567', '/path/to/document.pdf');
  console.log('Queued job:', job.id, job.status);
  const status = await client.getStatus(job.id);
  console.log('Status:', status.status);
}

run().catch(console.error);

Notes

  • Only .pdf and .txt files are accepted.
  • If the server requires an API key, it must be supplied via X-API-Key (handled automatically when apiKey is provided).
  • Optional helper: checkHealth() pings /health.

Publishing (maintainers)

Do not publish publicly without separate written permission from David Montgomery. The package is marked private, so npm blocks the npm publish step in the release workflow.

MCP Note

  • MCP (Model Context Protocol) is not part of this SDK. It is a separate integration layer for AI assistants.
  • See MCP integration for MCP setup and usage.