Skip to content
whatsapi.sh
Theme
Docs

Send your first message

One key, one paired number, one POST. If any of this takes more than five minutes, that is a bug in the product. Tell us.

1 · Create an API key

In the dashboard, open API keys and create one. It starts with wa_, and we show it exactly once, so copy it somewhere safe. The same key works for the REST API and for MCP.

2 · Pair a number

Open Numbers, add a number, then scan the QR code from WhatsApp under Settings → Linked devices. It is the same flow as linking WhatsApp Web. Your phone keeps working the whole time, because this is a linked device and not a copy. We also ask how long the line has been in use, because that sets how many new conversations it can start each day. If your plan is cold outreach at volume, pair a spare phone instead.

3 · Send

import { Whatsapi } from "@whatsapi.sh/sdk";

const wa = new Whatsapi({ apiKey: "wa_your_key" });

const data = await wa.sendMessage({ to: "+5511988887777", text: "Hello from whatsapi!" });
201 Created
{
  "data": {
    "id": "9c1f0b7e-8b1a-4a2e-9b0a-1f2e3d4c5b6a",
    "to": "+5511988887777",
    "from": "your-number-id",
    "status": "queued",
    "scheduledAt": "2026-08-24T19:18:00.000Z",
    "timestamp": "2026-08-24T19:00:00.000Z",
    "quotaRemaining": 199
  }
}

Messages you start come back queued, not sent, even for people you have contacted before. They leave 15 to 25 minutes apart by default. The send queue explains the timing. Replies go out now when the person wrote to your number in the last 24 hours. Their receipts arrive on your webhook.

That's the whole tour

Media, OTP, number checks and receipts are all in the REST reference. From TypeScript or JavaScript, the npm client is the same surface with types on it. If your client is an agent, the MCP server gives it the same operations as tools. Before you scale past test sends, read avoiding bans.