SDK
Node.js SDK + D-API WhatsApp API
The official TypeScript SDK to integrate the D-API WhatsApp API into your SaaS in seconds, with a fully typed client for messages, instances and webhooks.
The d-api-sdk package provides a fully typed client for Node.js and TypeScript, covering authentication, sending messages, instance management, webhooks and reports. Ideal for SaaS products that embed D-API as their WhatsApp infrastructure.
Highlights
- Complete typing (first-class TypeScript)
- Authenticated client with automatic retry
- No heavy dependencies
Use cases
Multi-tenant SaaS
Provision instances per customer and manage them through the SDK.
Node/Nest backends
Integrate with Next.js, NestJS, Fastify or Express.
TypeScript bots
Write bots and automations with IDE autocomplete.
Step by step
How it works
Install the package: npm install d-api-sdk
Import and instantiate the client with your API key.
Use typed methods to send messages, create instances and configure webhooks.
Frequently asked questions
Does the SDK work on edge runtimes?
Yes. It works on the standard Node.js runtime and on edge runtimes such as Cloudflare Workers and Vercel Edge.
Does it support streaming?
Endpoints that support streaming expose async methods with typed iterators.
Is the SDK open source?
Yes. The code is publicly available on npm and GitHub, with releases following semver.
