Skip to main content

Send WhatsApp Template

Endpoint: POST /api/v1/whatsapp/send-template Purpose: Sends a pre‑approved template message to a WhatsApp user. Request Body (JSON):
{
  "to": "+1234567890",
  "template": "order_confirmation",
  "language": "en_US",
  "components": [
    {
      "type": "body",
      "parameters": [
        { "type": "text", "text": "Order #12345" },
        { "type": "text", "text": "$99.99" }
      ]
    }
  ]
}
Headers:
  • Authorization: Bearer <API_KEY>
  • Content-Type: application/json
Response:
  • 200 OK – Message accepted for delivery.
  • Body:
{
  "message_id": "wamid.HBgM...",
  "status": "sent"
}
Error Cases:
  • 400 Bad Request – Invalid payload.
  • 401 Unauthorized – Invalid or missing API key.
  • 404 Not Found – Template not found or not approved.
Authentication: API key in Authorization header. Permissions: Requires whatsapp:send scope.