Send WhatsApp
Approved templates or session text inside the 24-hour window.
Scope whatsapp:send. Base path https://api.messengernepal.com.np/api/v1/whatsapp. Connect your WhatsApp Business number in the dashboard before you send. Template sends use POST /send with template_name or template_id. to may be a string or array. Session text (user messaged you first) uses POST /send/text within the 24-hour customer care window.
Successful sends return HTTP 202 with dispatch_id, job_id, message_id, and environment. Send Idempotency-Key on POST routes to avoid duplicate charges on retries.
Scenario 1 — approved template:
Request: POST /api/v1/whatsapp/send (template)
bash
curl -X POST "https://api.messengernepal.com.np/api/v1/whatsapp/send" \
-H "X-API-Key: msnp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: wa-template-1" \
-d '{
"to": "98XXXXXXX",
"template_name": "order_update",
"variables": {
"name": "Ada"
}
}'Response: 202 Accepted
json
{
"success": true,
"message": "WhatsApp message accepted",
"data": {
"dispatch_id": "661f0a1b2c3d4e5f67890123",
"job_id": "661f0a1b2c3d4e5f67890123",
"message_id": "661f0a1b2c3d4e5f67890123",
"status": "accepted",
"environment": "live",
"recipient": "98XXXXXXX",
"cost": 1,
"remaining_balance": 480,
"remaining_credits": 480
}
}Scenario 2 — session text (24-hour window open):
Request: POST /api/v1/whatsapp/send/text
bash
curl -X POST "https://api.messengernepal.com.np/api/v1/whatsapp/send/text" \
-H "X-API-Key: msnp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"to": "98XXXXXXX",
"message": "Thanks for your reply. Your ticket is open."
}'Scenario 3 — track delivery status:
Request: GET /api/v1/whatsapp/messages/:messageId
bash
curl -X GET "https://api.messengernepal.com.np/api/v1/whatsapp/messages/661f0a1b2c3d4e5f67890123" \
-H "X-API-Key: msnp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Response: 200 message status
json
{
"success": true,
"data": {
"message_id": "661f0a1b2c3d4e5f67890123",
"dispatch_id": "661f0a1b2c3d4e5f67890123",
"job_id": "661f0a1b2c3d4e5f67890123",
"status": "delivered",
"environment": "live",
"recipient": "98XXXXXXX",
"cost": 1,
"created_at": "2026-04-02T09:00:00.000Z",
"submitted_at": "2026-04-02T09:00:02.000Z",
"delivered_at": "2026-04-02T09:00:08.000Z",
"read_at": null,
"failed_at": null
}
}List approved templates with GET /templates (see WhatsApp templates).