WA Gateway

API Guide

Send WhatsApp messages from your own website or app. Everything is a simple HTTPS request with your API key. Messages are unlimited while your plan is active.

1. Get started

  1. Create an account and add your number.
  2. Press Connect and scan the QR code from WhatsApp → Linked devices.
  3. Open API Key and generate your key. Copy it, it is shown only once.
  4. Call the API from your server (PHP, Node, Python…). Never put the key in public JavaScript on a web page.
The API works only while your plan is active. When the plan days end, requests return error 402 until you renew.

2. Base URL and authentication

Base URL:

https://whatup.online/api/v1

Send your key in the Authorization header on every request:

Authorization: Bearer wa_live_xxxxxxxxxxxxxxxxxxxx

Send JSON with Content-Type: application/json. Responses are always JSON with "success": true or "success": false and an "error" message.

POST/send-text

Send a text message.

FieldRequiredDescription
numberYesReceiver, digits with country code, e.g. 919999999999. A 10-digit number gets the default country code (91).
messageYesText, up to 4000 characters.
instanceOnly if you have more than one numberThe name of your number (as shown in My Numbers).
curl -X POST https://whatup.online/api/v1/send-text \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number":"919999999999","message":"Hello from my website!"}'
<?php
$ch = curl_init('https://whatup.online/api/v1/send-text');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'number'  => '919999999999',
        'message' => 'Hello from my website!',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
const res = await fetch('https://whatup.online/api/v1/send-text', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ number: '919999999999', message: 'Hello from my website!' }),
});
console.log(await res.json());
import requests

r = requests.post(
    'https://whatup.online/api/v1/send-text',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={'number': '919999999999', 'message': 'Hello from my website!'},
    timeout=30,
)
print(r.json())

Response

{ "success": true, "message_id": "3EB0C767D0...", "status": "sent" }

POST/send-media

Send an image, video or document from a public file link.

FieldRequiredDescription
numberYesReceiver with country code.
mediaYesPublic http(s) link to the file.
typeNoimage, video or document. Detected from the file extension if empty.
captionNoText shown under the media (max 1000 characters).
filenameNoFile name shown for documents, e.g. invoice.pdf.
instanceOnly if you have more than one numberNumber name.
curl -X POST https://whatup.online/api/v1/send-media \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number":"919999999999","type":"document","media":"https://example.com/invoice.pdf","filename":"invoice.pdf","caption":"Your invoice"}'

GET/balance

Your plan, end date and days left.

curl https://whatup.online/api/v1/balance -H "Authorization: Bearer YOUR_API_KEY"
{ "success": true, "plan": "Monthly", "active": true, "plan_expires": "2026-12-10 23:59:59", "days_left": 28, "unlimited_messages": true, "rate_per_minute": null }

GET/instances

List your numbers and their status.

{ "success": true, "instances": [ { "name": "shop", "phone": "919999999999", "status": "open", "created_at": "..." } ] }

GET/status?instance=shop

Live connection check. connected: true means you can send.

{ "success": true, "instance": "shop", "status": "open", "connected": true }

GET/messages?limit=20

Your latest sent and received messages (max 100).

Receive messages (webhook)

In My Numbers, set a Webhook URL on your website. When a customer replies on WhatsApp, we send a POST request with JSON to that URL:

{
  "event": "message.received",
  "instance": "shop",
  "from": "919999999999",
  "name": "Customer name",
  "type": "text",
  "text": "Hi, I want to order",
  "message_id": "3EB0...",
  "timestamp": 1760000000
}

Reply with HTTP 200 quickly. Each request has an X-Signature header (HMAC-SHA256 of the body). The signing secret is shown under the webhook field in My Numbers. Compute hash_hmac('sha256', $rawBody, $secret) and compare it with the header to be sure the request is from us.

Errors

HTTPMeaning
400 / 422Missing or wrong input. Read the error text.
401Missing, wrong or deleted API key.
402Your plan has expired or you have no plan. Renew to continue.
404Number name not found in your account.
409Your WhatsApp number is not connected. Scan the QR again.
429Speed limit of your plan reached (only if your plan has one). Wait and retry.
502WhatsApp could not deliver this message.

Good practice

  • Only message people who agreed to hear from you. Spam can get your WhatsApp number banned.
  • Keep the key secret and call the API from your server only. If it leaks, generate a new key in the panel. The old one stops at once.
  • Do not send hundreds of messages at the same instant. Spread them out a little.
© 2026 WA Gateway