Getting Started
Rapiwa turns your own WhatsApp number into a programmable messaging API. Link a device once by scanning a QR code, then send and receive WhatsApp messages over plain HTTPS + JSON — from any language, with no Meta Business verification, template approval, or per-conversation fees.
How it works
- Devices — each linked WhatsApp number is a device with its own Device Key.
- Device Key — the Bearer token you send on every API call. It identifies exactly one device.
- Credits — every send / verify debits your wallet. New accounts start with free credits.
- Webhooks — Rapiwa POSTs inbound messages and delivery receipts to your server.
1. Create an account & link a device
- Sign up at app.rapiwa.com — you receive 200 free credits and a 3-day trial with 1 device.
- In the dashboard, click Add Device (adding a device is free). This generates a Device Key.
- Open QR for that device and scan it from WhatsApp → Linked devices on your phone. Once the phone shows the device as linked, the API is live.
Tips
The QR endpoint (GET /api/qr) returns a self-refreshing HTML page — just open it in a browser tab and scan. See Session & Device.
2. Send your first message
Base URL is https://app.rapiwa.com; every endpoint lives under /api/....
curl -X POST https://app.rapiwa.com/api/send-message \
-H "Authorization: Bearer YOUR_DEVICE_KEY" \
-H "Content-Type: application/json" \
-d '{"number":"8801234567890","message_type":"text","message":"Hello from Rapiwa!"}'
const res = await fetch('https://app.rapiwa.com/api/send-message', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RAPIWA_DEVICE_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
number: '8801234567890',
message_type: 'text',
message: 'Hello from Rapiwa!',
}),
})
console.log(await res.json())
import requests
res = requests.post(
'https://app.rapiwa.com/api/send-message',
headers={'Authorization': f'Bearer {DEVICE_KEY}'},
json={'number': '8801234567890', 'message_type': 'text', 'message': 'Hello from Rapiwa!'},
)
print(res.json())
<?php
$ch = curl_init('https://app.rapiwa.com/api/send-message');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $deviceKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'number' => '8801234567890',
'message_type' => 'text',
'message' => 'Hello from Rapiwa!',
]),
]);
echo curl_exec($ch);
Successful response:
{ "success": true, "message_type": "text", "message_id": "3EB0A1B2C3…", "to": "8801234567890" }
Keep the returned message_id — you need it to delete or quote the message later.
Shortcut URL
The messaging endpoints also answer without the /api prefix (https://app.rapiwa.com/send-message, /send-bulk-message, /delete-message) so older snippets keep working. The canonical, documented path is /api/send-message.
3. Receive messages (optional)
Set a Webhook URL on the device in the dashboard. Rapiwa will POST every inbound message and delivery receipt to that URL. See Inbound webhook and Delivery status.
Next steps
- Authentication — Device Keys, tenant API key
- Credits & pricing — what each call costs
- Rate limits — burst ceilings &
429handling - Errors — the error envelope & status codes
- API Reference — every endpoint