WaBot / Guides
Send WhatsApp messages from your app
WaBot gives your own WhatsApp number a simple HTTP API: one POST request sends a text, image, video or document. Use it for order confirmations, appointment reminders, invoices and alerts, from your code, Google Sheets, Zapier or Make.
Updated October 8, 2026
Before you start
- 1 Start a free trial with your email: your API key arrives in your inbox (3 days, no card).
- 2 Open the portal link from that email, go to Connect Device and scan the QR code from WhatsApp → Linked devices.
-
3
Keep your API key secret, like a password: send it in the
Authorizationheader, never in a public web page.
Send a text message
Send a POST request to https://wabot.astranexo.com/api/send-message with your key as a Bearer token:
curl -X POST https://wabot.astranexo.com/api/send-message \
-H "Authorization: Bearer $WABOT_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "50688887777", "message": "Your order #1001 ships today"}'
to: the recipient's number with its country code (8 to 20 characters;+, spaces, dashes and parentheses are fine).message: the text, up to 4,096 characters. Emoji and line breaks work.idempotency_key(optional): your own ID for the message. Sending again with the same key returns the first message instead of sending twice, so retries are safe.link_preview(optional):falsesends the text without the preview card WhatsApp shows for its first link. On by default.
WaBot answers right away and queues the message:
{
"success": true,
"message": "Message queued successfully",
"message_id": 123,
"status": "queued",
"queue_position": 1,
"estimated_wait_seconds": 0,
"remaining_today": null
}
Send an image, video or document
Use /api/send-media with a public link to the file. WaBot downloads it and sends it from your number, with an optional caption:
curl -X POST https://wabot.astranexo.com/api/send-media \
-H "Authorization: Bearer $WABOT_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "50688887777", "file_url": "https://example.com/invoice-1001.pdf", "caption": "Invoice #1001"}'
- Images: JPG, PNG, GIF, WebP. Video: MP4, 3GP. Documents: PDF, Word, Excel, PowerPoint. Audio: MP3, OGG, WAV.
- Up to 16 MB, from a link anyone can open.
Check that it went out
Every send returns a message_id. Ask for its status:
curl https://wabot.astranexo.com/api/message/123/status \
-H "Authorization: Bearer $WABOT_KEY"
The status goes queued → sending → sent, or failed with the reason in error. sent means WhatsApp accepted the message from your number.
Examples in your language
JavaScript (Node.js 18+, ES module)
const response = await fetch('https://wabot.astranexo.com/api/send-message', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WABOT_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ to: '50688887777', message: 'Your appointment is tomorrow at 9:00' }),
});
console.log(await response.json());
Python
import os, requests
response = requests.post(
'https://wabot.astranexo.com/api/send-message',
headers={'Authorization': f"Bearer {os.environ['WABOT_KEY']}"},
json={'to': '50688887777', 'message': 'Your appointment is tomorrow at 9:00'},
)
print(response.json())
PHP (Laravel)
use Illuminate\Support\Facades\Http;
$response = Http::withToken(config('services.wabot.key'))
->post('https://wabot.astranexo.com/api/send-message', [
'to' => '50688887777',
'message' => 'Your appointment is tomorrow at 9:00',
]);
$messageId = $response->json('message_id');
Send from Google Sheets
In your sheet, open Extensions → Apps Script and paste this function. Save your API key under Project Settings → Script properties as WABOT_KEY, so it isn't in the code:
function sendWhatsApp(to, message) {
const key = PropertiesService.getScriptProperties().getProperty('WABOT_KEY');
const response = UrlFetchApp.fetch('https://wabot.astranexo.com/api/send-message', {
method: 'post',
contentType: 'application/json',
headers: { Authorization: 'Bearer ' + key },
payload: JSON.stringify({ to: String(to), message: message }),
muteHttpExceptions: true,
});
return JSON.parse(response.getContentText());
}
Call it from your own script, for example in a loop over the rows of your sheet. WaBot spaces the sends for you.
Zapier and Make
No code needed: in Zapier use Webhooks by Zapier, and in Make use the HTTP module. Send a POST to https://wabot.astranexo.com/api/send-message with the header Authorization: Bearer plus your key, and a JSON body with to and message, the same as the examples above.
Limits and good practice
- Messages from your number go out one at a time, at least 5 seconds apart (up to 10 per minute), to stay within WhatsApp's guidelines. You can queue them all at once; WaBot does the spacing.
- The free trial includes 50 messages in total. Paid plans have no daily cap.
- If your phone disconnects, messages wait up to 24 hours and go out when you link it again.
- The API sends; it doesn't notify you of incoming messages. To read and answer chats, connect Claude or ChatGPT.
- WaBot is not Meta's official WhatsApp Business API: it links your number the way WhatsApp Web does. Use it for messages people expect, not bulk or unsolicited messages.
Which plan do I need?
To message customers or anyone else, choose Unlimited ($6/month or $60/year), documents included. Personal ($1/month or $10/year) sends text, images and video to your own number only, which suits alerts and reminders to yourself. Compare plans.
If something goes wrong
401: the API key is missing or wrong.403with"reason": "plan_expired": your trial or plan ended. The response includes anupgrade_urlto subscribe; your key stays the same.422: a field is missing or invalid (for example, a number that is too short).403with"reason": "trial_limit": the free trial's 50 messages are used up. The response includes anupgrade_urlto subscribe; your key stays the same.429: you're sending too fast. Wait the seconds inretry_afterand try again.