---
title: "WhatsApp API for SaaS | D-API"
description: "Multi-tenant WhatsApp API for SaaS: dedicated proxy per connection, per-instance isolation, official Node.js SDK, webhooks with retries and REST in Swagger."
url: https://d-api.cloud/en/whatsapp-api-for-saas
---

Use case · SaaS

# The WhatsApp API ready to embed in your SaaS.

You want to sell WhatsApp as a feature of your SaaS without turning your product team into an infrastructure team. D-API delivers WhatsApp API infrastructure ready to scale per customer, so your engineers focus on what matters.

-   Uptime: 99.9%
-   Integration: 1 day
-   Billing: Per instance

## Talk to our team

See how D-API fits into your product. Support in English, and we reply within 1 business day.

Short answer

## How do you add WhatsApp to a SaaS product?

Use a WhatsApp API that creates an isolated connection for each customer of your SaaS. With D-API, your backend creates the session with a POST to /api/v1/sessions, shows the QR code inside your product and receives messages and statuses by webhook. Each connection runs in isolation, with its own proxy and IP, and billing is per active connection, not per message.

The problem

## You shouldn't be solving this.

Problems D-API takes off your plate.

1.  ### Engineering turning into infrastructure
    
    Your product team stopped shipping features to babysit QR codes and reconnections.
    
2.  ### Customers taking each other down
    
    When one number drops, the others drop too, because everything runs on the same server.
    
3.  ### Unpredictable billing
    
    Per-message pricing becomes a variable cost that is hard to pass on to your end customer.
    

How it works

## From zero to production in five steps.

1.  ### Open the docs
    
    Explore every endpoint with JSON request and response examples, and test right in the browser.
    
    [docs.d-api.cloud](https://docs.d-api.cloud/)
    
2.  ### Integrate via REST or SDK
    
    Call the API directly from any language or use d-api-sdk in Node/TypeScript for ready-made typings.
    
3.  ### Provision per customer
    
    Create an isolated instance per tenant with a single POST, all managed through the API.
    
4.  ### Listen for events
    
    Receive messages and statuses via webhooks with automatic retries for unacknowledged events.
    
5.  ### Scale predictably
    
    The more customers, the lower the cost per instance, with no message limits.
    

Node.jscURLPythonPHP

```
import { DApi } from 'd-api-sdk'

const dapi = new DApi({ apiKey: process.env.DAPI_API_KEY })

await dapi.sessions.create({
  sessionId: 'customer-42',
  webhookUrl: 'https://your-app.com/webhooks/whatsapp',
})

const { qrCodeImage } = await dapi.sessions.getQRCode('customer-42')

// once the number scans the QR code
await dapi.messages.sendText({
  sessionId: 'customer-42',
  to: '14155550123',
  text: 'Your order is confirmed!',
})
```

```
curl -X POST https://api.d-api.cloud/api/v1/sessions \
  -H "Authorization: $DAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sessionId": "customer-42", "webhookUrl": "https://your-app.com/webhooks/whatsapp"}'

curl https://api.d-api.cloud/api/v1/sessions/customer-42/qr \
  -H "Authorization: $DAPI_API_KEY"

# once the number scans the QR code
curl -X POST https://api.d-api.cloud/api/v1/messages/send/text \
  -H "Authorization: $DAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sessionId": "customer-42", "to": "14155550123", "text": "Your order is confirmed!"}'
```

```
import os
import requests

API = "https://api.d-api.cloud/api/v1"
HEADERS = {"Authorization": os.environ["DAPI_API_KEY"]}

requests.post(f"{API}/sessions", headers=HEADERS, timeout=10, json={
    "sessionId": "customer-42",
    "webhookUrl": "https://your-app.com/webhooks/whatsapp",
})

qr = requests.get(f"{API}/sessions/customer-42/qr", headers=HEADERS, timeout=10).json()

# once the number scans the QR code
requests.post(f"{API}/messages/send/text", headers=HEADERS, timeout=10, json={
    "sessionId": "customer-42",
    "to": "14155550123",
    "text": "Your order is confirmed!",
})
```

```
<?php
use GuzzleHttp\Client;

$dapi = new Client([
    'base_uri' => 'https://api.d-api.cloud/api/v1/',
    'headers'  => ['Authorization' => getenv('DAPI_API_KEY')],
    'timeout'  => 10,
]);

$dapi->post('sessions', ['json' => [
    'sessionId'  => 'customer-42',
    'webhookUrl' => 'https://your-app.com/webhooks/whatsapp',
]]);

$qr = json_decode($dapi->get('sessions/customer-42/qr')->getBody(), true);

// once the number scans the QR code
$dapi->post('messages/send/text', ['json' => [
    'sessionId' => 'customer-42',
    'to'        => '14155550123',
    'text'      => 'Your order is confirmed!',
]]);
```

### Works with the tools you already use

-   REST + Swagger
-   Node.js SDK
-   Webhooks with retries
-   RabbitMQ
-   Amazon S3 & MinIO

What you get

## WhatsApp as a feature of your product, not a headache.

-   ### REST API with Swagger
    
    Test endpoints and generate collections right in the browser with [our interactive docs](https://docs.d-api.cloud/).
    
-   ### Any language
    
    Standard REST authenticated by API key: it works with Node, Python, Go, PHP, Ruby, .NET or any stack that speaks HTTP.
    
-   ### Native multi-tenancy
    
    Provision an isolated instance per customer via API, without mixing data or queues.
    
-   ### Webhooks with automatic retries
    
    Automatic retries with exponential backoff for events your endpoint does not acknowledge.
    
-   ### Node.js SDK (optional)
    
    d-api-sdk with full typings, automatic retries and webhook helpers for teams already in the Node ecosystem.
    
-   ### 99.9% uptime
    
    Self-healing and real isolation: one customer's outage does not take down the others.
    
-   ### Dedicated proxy
    
    Each connection gets a proxy with its own IP, managed automatically by D-API, reducing the risk of your customers' numbers being banned.
    
-   ### Per-instance billing
    
    Predictable, tiered cost: the more instances, the lower the unit price.
    
-   ### Dedicated onboarding
    
    We set up a WhatsApp group with your team to answer questions and follow the implementation, with support in English. If you need more time, we extend the trial, all at no cost.
    

Scale plan

## Unlimited instances. Pay only for what you use.

For SaaS, $9.90 per connection from the very first one, and the price drops on its own as your customer base grows.

1.  SaaS deal1 to 10 connections
    
    $15.00$9.90
    
    per connection/month
    
    Even with fewer than 10 connections, when you sign with our sales team
    
2.  11 to 50 connections
    
    $8.75
    
    per connection/month
3.  Over 50 connectionsTalk to sales
    
    The price per connection keeps dropping. We build the deal around your volume.
    
    [Talk to sales](https://wa.me/5551920018823?text=Hi%2C%20I%27d%20like%20to%20talk%20about%20D-API%27s%20Scale%20plan%20for%20more%20than%2050%20connections.)
    

### Everything included in every connection

Unlimited instances, no per-message fees and discounts applied automatically as you grow.

#### Connection

-   Unofficial WhatsApp API (QR code)
-   Official WhatsApp API (Meta Cloud API), templates billed by Meta
-   Dedicated IP per connection
-   Per-instance isolation with self-healing
-   99.9% uptime

#### Messages

-   Text, image, audio, video and documents
-   Buttons, lists and carousels
-   Polls, location, contacts and reactions
-   No per-message fees

#### WhatsApp features

-   WhatsApp voice calls (VoIP): make and receiveBonus
-   Group and participant management
-   Contacts, labels and WhatsApp number check
-   Channels (newsletter) and product catalog
-   Chat history

#### Integration and support

-   Webhooks with retries and RabbitMQ
-   REST with Swagger, Node SDK and n8n
-   Create connections through the API
-   Support in English via WhatsApp

[Talk to sales](https://d-api.cloud/#lead)SaaS deal available only through our sales team.

FAQ

## Frequently asked questions.

### Do I have to use the Node.js SDK?

No. The API is standard REST authenticated by API key and works in any language. The Node.js SDK is just a shortcut for teams in the Node/TypeScript ecosystem.

### Where can I find the API docs?

In the [Swagger docs](https://docs.d-api.cloud/) (OpenAPI 3). You test endpoints right in the browser and export collections to Postman or Insomnia.

### Can I provision instances via API?

Yes. All instance management (create, connect, pause, delete) is available via REST and also exposed in the Node.js SDK.

### Does the price scale with the number of customers?

Yes. On the Scale plan the price per connection drops automatically as the total grows. For SaaS companies that sign up through sales, a connection costs $9.90/month from the very first one, and $8.75 from 11 to 50 connections. Above 50, talk to sales.

### How do I keep data separate between customers?

Each instance runs in an isolated environment with its own credentials and webhook. Data never crosses between tenants.

### What does onboarding look like for SaaS?

We open a WhatsApp group with your technical team to answer questions during rollout, follow the first provisioning runs and unblock integrations. If the standard trial is not enough, we extend it at no cost.

## Related guides

-   [WhatsApp API for CRM](https://d-api.cloud/en/whatsapp-api-for-crm)
-   [Multiple numbers](https://d-api.cloud/en/whatsapp-api-multiple-numbers)
-   [WhatsApp webhooks](https://d-api.cloud/en/whatsapp-webhook)
-   [Z-API alternative](https://d-api.cloud/en/z-api-alternative)

## Ready to go to production?

3-day free trial with full access. No credit card, no lock-in.

[Talk to sales](https://d-api.cloud/#lead)[Read the docs](https://docs.d-api.cloud/)
