Skip to content

WhatsApp Messaging API

Send approved WhatsApp template messages, or free-form text inside an active 24-hour customer service window, through a connected WhatsApp Business Account. Available send methods and volume depend on package access, account status, permissions, and provider limits.

Public send methods

Approved template, free-form text

Delivery status

Reported by the connected provider

Per-phone limit

5 messages per hour

Template approval

Managed in Meta Business tools

Send a template message

POST /api/v1/whatsapp/messages/send — Send one approved template. Requires the whatsapp:send scope and an active WhatsApp package.

import { createClient } from '@emacrontechnologies/outreachagent';
const oa = createClient(process.env.API_KEY);

// Send an approved WhatsApp template message
const result = await oa.whatsapp.sendTemplate({
  to: '+919876543210',
  template: 'order_confirmation',
  language: 'en_US',
  variables: {
    '1': 'ORD-12345',
    '2': '2,499',
  },
});
console.log(result.message_id);

Template variables

WhatsApp templates use numbered placeholders like {{1}}, {{2}}. Map each placeholder to a value in the variables object, using the placeholder index or name as the key.

Example template body

"Your order {{1}} for ₹{{2}} has been shipped. Track at {{3}}"

Mapped variables

"variables": { "1": "ORD-12345", // {{1}} "2": "2499", // {{2}} "3": "track.xyz/12345" // {{3}} }

Send free-form text

POST /api/v1/whatsapp/messages/send-text — Send plain text only inside the 24-hour customer service window. For business-initiated messages, use an approved template instead.

// Only within the 24-hour customer service window
const result = await oa.whatsapp.sendText({
  to: '+919876543210',
  text: 'Hello! Your order #12345 has been shipped.',
});
console.log(result.message_id);

Supported message types

TypeWhen to useTemplate required?
templateBusiness-initiated messages, notifications, and OTPYes
textReply inside the 24-hour customer service windowNo

Media and interactive messages are not exposed by the public send endpoints. Bulk broadcasts are managed in the CRM app; the public API sends one recipient per request.

Rate limits

EndpointLimit
POST /whatsapp/messages/send5 messages per phone per hour
POST /whatsapp/messages/send-text5 messages per phone per hour
All API endpoints1,000 requests per hour per API key (workspace-configurable)
Provider limitsMeta also applies limits to the connected WhatsApp Business Account

Downloads & tools