Developer docs
Quickstart: send your first message in 5 minutes
Create an API key, check it works, and send a WhatsApp template message with curl, Node or Python.
You need a WHAASS account with a connected WhatsApp Business number, API access switched on, and one approved template.
1. Create an API key
In app.whaass.com, go to Settings → Integrations → API keys and create a key. It looks like whaass_ak_<id>_<secret> and is shown once, so copy it now.
export WHAASS_KEY="whaass_ak_..."
2. Check the key
curl https://waas-api.hitoritech.com/api/v1/external/me \
-H "x-api-key: $WHAASS_KEY"
You should see your account with "whatsappConnected": true. A 403 saying External API access is not enabled means access hasn't been switched on yet: use Request API access in the docs sidebar.
3. Pick a template
The first message to anyone must be an approved template. List yours:
curl https://waas-api.hitoritech.com/api/v1/external/templates \
-H "x-api-key: $WHAASS_KEY"
Note the name and language of one with "status": "APPROVED".
4. Send it
Use your own phone number as the recipient, in international format.
curl
curl -X POST https://waas-api.hitoritech.com/api/v1/external/messages/template \
-H "x-api-key: $WHAASS_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "5511987654321", "templateName": "hello_world", "language": "en_US"}'
Node
const res = await fetch("https://waas-api.hitoritech.com/api/v1/external/messages/template", {
method: "POST",
headers: {
"x-api-key": process.env.WHAASS_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ phone: "5511987654321", templateName: "hello_world", language: "en_US" }),
});
console.log(res.status, await res.json());
Python
import os, requests
res = requests.post(
"https://waas-api.hitoritech.com/api/v1/external/messages/template",
headers={"x-api-key": os.environ["WHAASS_KEY"]},
json={"phone": "5511987654321", "templateName": "hello_world", "language": "en_US"},
)
print(res.status_code, res.json())
A 201 with a data.id (the WhatsApp message ID) means Meta accepted it.
5. Reply with free text
Reply to the message on your phone. That opens a 24-hour window in which you can send plain text:
curl -X POST https://waas-api.hitoritech.com/api/v1/external/messages/text \
-H "x-api-key: $WHAASS_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "5511987654321", "text": "Thanks for replying!"}'
If the message doesn't arrive
A 201 means Meta accepted the message, not that the phone received it. Watch the message.status webhook for delivered, and read Errors if it never comes. The most common causes are a wrong country format (Mexico 52 vs 521, Argentina 54 vs 549, Brazil's ninth digit) and an unpaid Meta account. Our guide WhatsApp API says sent but the message never arrives walks through all nine causes.
Next
- Set up a webhook so replies reach your server as they arrive.
- Connect WHAASS to a CRM or helpdesk.