WhatsApp Developer API Documentation

Outbound Transactional & Utility Message Gateway API v1.0

REST API Reference

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:

Option A: Bearer Token (Recommended)Authorization: Bearer pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8f
Option B: Custom Headerx-api-key: pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8f
Option C: GET Query Parameter?apiKey=pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8f

2. Send WhatsApp Template Message

POSTGEThttps://app.pistioai.com/api/v1/whatsapp/send

Dispatches an approved WhatsApp WABA template message to the recipient.

Request Parameters

FieldTypeRequiredDescription
to / phonestring | arrayYesSingle number (+919876543210), comma-separated list (+919876543210, +919876543211), or array (["+919876543210", "+919876543211"]).
templatestringYesMeta Approved Template Name (e.g. order_confirmation)
variablesarray / queryNoArray 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

Browser / Webhook URL Hit Format:
https://app.pistioai.com/api/v1/whatsapp/send?apiKey=pst_live_wh_9a8b7c6d5e4f3a2b1c0d9e8f&to=%2B919876543210&template=order_confirmation&var1=1001&var2=%E2%82%B91%2C299
curl -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"]
  }'
Sample 200 OK JSON Response
{
  "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 StatusError Code / Meta CodeDescription & CauseActionable Fix
401ERR_API_KEY_INVALIDAPI key is missing, corrupted, or incorrect.Verify your secret API key in WhatsApp Dashboard.
401ERR_API_KEY_DISABLEDAPI key has been temporarily disabled by merchant.Click "Enable Key" in the developer API tab.
400ERR_MISSING_RECIPIENTRecipient phone number field ('to') is missing.Provide valid phone e.g. +919876543210.
400ERR_MISSING_TEMPLATETemplate name field ('template') is missing.Provide approved WABA template name.
404ERR_TEMPLATE_NOT_FOUNDSpecified template name does not exist in your tenant store.Sync or create template in Registered Templates tab.
422ERR_TEMPLATE_NOT_APPROVEDTemplate exists but is in PENDING or REJECTED state.Wait for Meta approval in Registered Templates tab.
500ERR_META_API_FAILEDMeta WABA Cloud API rejected payload.Inspect the returned metaError object for Meta error code.
Meta WABA Cloud API Errors (Inside metaError Object)
500Meta Code 132001Template name does not exist in the approved language translation.System auto-resolves approved language. Verify template status in Meta Manager.
500Meta Code 131009Parameter count mismatch (variables count != template placeholders).Provide exact number of parameters expected by {{1}}, {{2}}.
500Meta Code 131026Message undeliverable or recipient phone number is not on WhatsApp.Verify recipient phone number is active on WhatsApp.
500Meta Code 130561Rate limit exceeded or 24-hour service window expired.Use an approved template message to re-open customer conversation window.
500Meta Code 190Meta System User Access Token expired or revoked.Reconnect WABA account or update System User token.
500Meta Code 100Invalid parameter passed to Meta Cloud API.Check JSON payload structure and parameters.