WhatsApp Outbound Messaging API
Trigger Meta WABA template messages directly from your external CRM, backend server, mobile app, or webhooks. Supports both POST (JSON Payload) and GET (URL Query Parameters).
1. Authentication
Authenticate your API requests using your merchant secret API key (available in your WhatsApp Dashboard). You can pass the key in 3 flexible ways:
Authorization: Bearer pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8fx-api-key: pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8f?apiKey=pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8f2. Send WhatsApp Template Message
https://app.pistioai.com/api/v1/whatsapp/sendDispatches an approved WhatsApp WABA template message to the recipient.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| to / phone | string | array | Yes | Single number (+919876543210), comma-separated list (+919876543210, +919876543211), or array (["+919876543210", "+919876543211"]). |
| template | string | Yes | Meta Approved Template Name (e.g. order_confirmation) |
| variables | array / query | No | Array of text parameters for {{1}}, {{2}} or ?var1=&var2= |
Note: The approved Meta template language (e.g. en_US) is automatically resolved from your database template record. Both single and multiple recipient numbers are supported in a single API hit.
GET Quick URL Execution
https://app.pistioai.com/api/v1/whatsapp/send?apiKey=pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8f&to=%2B919876543210&template=order_confirmation&var1=1001&var2=%E2%82%B91%2C299curl -X POST "https://app.pistioai.com/api/v1/whatsapp/send" \
-H "Authorization: Bearer pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8f" \
-H "Content-Type: application/json" \
-d '{
"to": "+919876543210",
"template": "order_confirmation",
"variables": ["1001", "₹1,299", "Delivered by Tomorrow"]
}'{
"success": true,
"status": "accepted",
"messageId": "wamid.HBgLOTE5ODc2NTQzMjEwFQIAERgSQjE2OTAyQUUxNUEzQ0E5OUE1AA==",
"conversationId": "cm-6363f968-2ed3-44db-bf04-1484d700faf1",
"recipient": "919876543210",
"template": "order_confirmation",
"timestamp": "2026-08-06T06:15:00.000Z"
}3. Complete API Error Codes & Meta WABA Specifications
Detailed cheat sheet covering all standard HTTP platform error codes and Meta WABA Cloud API error objects.
| HTTP Status | Error Code / Meta Code | Description & Cause | Actionable Fix |
|---|---|---|---|
| 401 | ERR_API_KEY_INVALID | API key is missing, corrupted, or incorrect. | Verify your secret API key in WhatsApp Dashboard. |
| 401 | ERR_API_KEY_DISABLED | API key has been temporarily disabled by merchant. | Click "Enable Key" in the developer API tab. |
| 400 | ERR_MISSING_RECIPIENT | Recipient phone number field ('to') is missing. | Provide valid phone e.g. +919876543210. |
| 400 | ERR_MISSING_TEMPLATE | Template name field ('template') is missing. | Provide approved WABA template name. |
| 404 | ERR_TEMPLATE_NOT_FOUND | Specified template name does not exist in your tenant store. | Sync or create template in Registered Templates tab. |
| 422 | ERR_TEMPLATE_NOT_APPROVED | Template exists but is in PENDING or REJECTED state. | Wait for Meta approval in Registered Templates tab. |
| 500 | ERR_META_API_FAILED | Meta WABA Cloud API rejected payload. | Inspect the returned metaError object for Meta error code. |
| Meta WABA Cloud API Errors (Inside metaError Object) | |||
| 500 | Meta Code 132001 | Template name does not exist in the approved language translation. | System auto-resolves approved language. Verify template status in Meta Manager. |
| 500 | Meta Code 131009 | Parameter count mismatch (variables count != template placeholders). | Provide exact number of parameters expected by {{1}}, {{2}}. |
| 500 | Meta Code 131026 | Message undeliverable or recipient phone number is not on WhatsApp. | Verify recipient phone number is active on WhatsApp. |
| 500 | Meta Code 130561 | Rate limit exceeded or 24-hour service window expired. | Use an approved template message to re-open customer conversation window. |
| 500 | Meta Code 190 | Meta System User Access Token expired or revoked. | Reconnect WABA account or update System User token. |
| 500 | Meta Code 100 | Invalid parameter passed to Meta Cloud API. | Check JSON payload structure and parameters. |