API Reference

Integrate What Sender into your applications

Authentication

Messaging, contacts and template requests require an API key. You can generate API keys from your dashboard under Settings > API Keys. API access needs an active paid plan that includes it (API Starter, API Pro, API Enterprise, Business and Enterprise). Use GET /api/v1/sessions with your API key to find the sessionId of each connected WhatsApp number. Other account endpoints (auth and session management) use your dashboard login token.

Include your API key in the request header:

X-API-Key: your_api_key_here

Security: Never expose your API key in client-side code. Always make API calls from your backend server.

Base URL

https://whatsender.dev/api/v1

Endpoints

GET/api/v1/auth/me

Get the current user, tenant, subscription and plan limits. Requires a login (JWT) token from the dashboard, not an API key

Headers
Authorization: Bearer {token}
Response
{
  "success": true,
  "data": {
    "user": {
      "id": "...",
      "email": "user@example.com",
      "name": "John Doe",
      "role": "...",
      "planName": "...",
      "features": { }
    },
    "tenant": {
      "id": "...",
      "name": "My Company",
      "slug": "my-company",
      "wahaConnected": true
    },
    "subscription": {
      "status": "active",
      "plan": "...",
      "planName": "...",
      "currentPeriodEnd": "2026-12-01T00:00:00.000Z",
      "messagesUsedToday": 12,
      "messagesUsedThisMonth": 340
    },
    "limits": {
      "dailyMessages": 1000,
      "monthlyMessages": 30000,
      "maxContacts": 10000,
      "maxTemplates": 50
    }
  }
}

Rate Limits

API rate limits vary by plan. Exceeding limits returns a 429 error. Limits are per account.

PlanAPI RequestsMessages
All plans (per account)500/minute30 send requests/minute (/messages/send, /messages/bulk and their aliases)
Daily and monthly message caps-Set by your plan; sends over the cap are rejected

Error Codes

CodeMessageDescription
400Bad RequestInvalid request body or parameters
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient permissions or plan limits
404Not FoundResource does not exist
429Too Many RequestsRate limit exceeded
500Server ErrorInternal server error

Code Examples

JavaScript (Node.js)

const axios = require('axios');

const API_KEY = 'your_api_key';
const BASE_URL = 'https://whatsender.dev/api/v1';
const SESSION_ID = 'your_session_id';

// Send a message
async function sendMessage(phone, message) {
  const response = await axios.post(
    `${BASE_URL}/messages/send`,
    { phone, sessionId: SESSION_ID, message },
    { headers: { 'X-API-Key': API_KEY } }
  );
  return response.data;
}

sendMessage('919876543210', 'Hello!')
  .then(console.log)
  .catch(console.error);

Python

import requests

API_KEY = 'your_api_key'
BASE_URL = 'https://whatsender.dev/api/v1'
SESSION_ID = 'your_session_id'

def send_message(phone, message):
    response = requests.post(
        f'{BASE_URL}/messages/send',
        json={'phone': phone, 'sessionId': SESSION_ID, 'message': message},
        headers={'X-API-Key': API_KEY}
    )
    return response.json()

result = send_message('919876543210', 'Hello!')
print(result)

cURL

curl -X POST https://whatsender.dev/api/v1/messages/send \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"phone": "919876543210", "sessionId": "your_session_id", "message": "Hello!"}'