WhatsApp API

WhatsApp API and webhooks for your CRM

Send order updates, OTPs, payment reminders and documents from your CRM, store or app with one HTTP request. Get delivery, read and failure statuses and every customer reply back as webhooks, so your system always knows what happened.

  • REST API with JSON
  • Templates, media and buttons
  • Status and reply webhooks
  • Works with any CRM
Illustrative API request sending an order_shipped template to a customer, a message.read webhook sent to the CRM, and chips for accepted, delivered and reply events

What is a WhatsApp API for CRM integration?

A WhatsApp API for CRM integration is an HTTP interface that lets a CRM, store or app send WhatsApp messages, such as approved templates, media and buttons, through the WhatsApp Business Platform. Webhooks send delivery, read and failure statuses and customer replies back to the same system as they happen.

Updated

WhatsApp API at a glance

Interface
REST API over HTTPS, JSON requests and responses
Auth
API key sent as a Bearer token
Send
Templates, text, media, buttons, lists, location
Webhooks
sent, delivered, read, failed, clicked, received
Connects to
Any CRM, ERP, store or app that can call an API
No-code options
Zapier, Google Sheets and plugins

How does the WhatsApp API connect to your CRM?

Your system starts the message, WhatsApp delivers it, and webhooks bring every status and reply back to the customer's record.

Your CRMOrder shipsCalls the API with template and variables
MsgClub APIValidates and sendsReturns a message ID
WhatsAppCustomer receives itReads, taps a button or replies
WebhookEvents to your URLdelivered, read, received
Your CRMRecord updatedReply creates a task or lead

How do you send a WhatsApp template message by API?

To start a conversation, send an approved template by name with its language and the values for its variables. MsgClub replies with a message ID straight away; delivery and read statuses follow by webhook.

  • Use the number in international format, for example 91 followed by the 10-digit mobile number
  • Template name and language must match an approved template
  • Variables fill the placeholders in order: name, order number, date
  • Add a header image or PDF link if the template has a media header
curl -X POST "{API_BASE_URL}/whatsapp/messages" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "919876543210",
    "type": "template",
    "template": {
      "name": "order_shipped_v2",
      "language": "en",
      "header_media": "https://example.in/img/4182.jpg",
      "variables": ["Priya", "4182", "14 Nov"]
    },
    "webhook_url": "https://crm.example.in/hooks/whatsapp"
  }'

Illustrative example. Exact endpoints and field names are in the API docs, shared when you get API access.

Which webhook events will you receive?

Set a webhook URL once, or per request, and MsgClub posts an event to it each time something happens to a message. Reply with HTTP 200 to acknowledge it.

WhatsApp webhook events
EventWhen it is sent
message.sentThe message was accepted by WhatsApp
message.deliveredIt reached the customer's phone
message.readThe customer opened it (if read receipts are on)
message.failedIt could not be delivered, with a reason
message.clickedThe customer clicked a tracked link button
message.receivedThe customer sent a message, tapped a reply button or shared media or a location
{
  "event": "message.read",
  "message_id": "wamid.HBgMOTE5ODc2NTQzMjEwFQ",
  "to": "919876543210",
  "template": "order_shipped_v2",
  "category": "utility",
  "timestamp": "2026-11-14T10:43:05+05:30"
}

Illustrative example. Exact endpoints and field names are in the API docs, shared when you get API access.

What else can you send through the API?

Inside the 24-hour customer service window you can send any of these without a template. Outside it, use a template that includes them.

Media
Images, videos, audio and documents such as invoices, tickets and reports, sent by public URL. Meta sets size limits per type, for example 5 MB for images.
Buttons and lists
Up to 3 reply buttons, or a list of up to 10 options. The customer's choice comes back in message.received with the button ID.
Call-to-action buttons
A button that opens a link or calls your number, for payment links, tracking pages and support lines.
Location request
Ask the customer to share a location with one tap; the coordinates arrive by webhook.
Authentication templates
OTPs with a copy-code button, for login and payment verification.
Catalogue and carousels
Product messages from your catalogue, and carousel templates with up to 10 cards.

Good practice for developers

  • Store the message ID with your record and match every webhook on it
  • Process webhooks quickly and idempotently; the same event can arrive twice
  • Check the 24-hour window before sending free-form text; otherwise use a template
  • Keep your API key on the server, never in a browser or mobile app
  • Send only to customers who opted in, and save the opt-in record

No developer? Use the panel or Zapier

Upload contacts and send broadcasts from the web panel, answer in the team inbox, automate replies with the chatbot, or connect Google Sheets, Zapier and other tools. The same account also sends SMS by API as a fallback.

See all channels on the integrations page, code samples in the developer docs, and message costs in the WhatsApp pricing guide and pricing.

Frequently asked questions

How do I get WhatsApp API access from MsgClub?

Sign up, connect your number to the WhatsApp Business API with our onboarding team, and get your first templates approved. You then receive an API key and the API documentation with exact endpoints and field names. Your developers can then send a test template to their own number before going live.

Can I send free-form messages through the API?

Yes, but only while the 24-hour customer service window is open, which happens when the customer has messaged you in the last 24 hours. Outside the window the API accepts only approved template messages. If you send a free-form message to a closed window, it fails with an error you receive by webhook.

Which CRMs can I connect to the WhatsApp API?

Any CRM or software that can make an HTTP request or receive a webhook, including in-house systems. Teams connect tools such as Zoho CRM, HubSpot, LeadSquared and Salesforce through their own API features or Zapier, and Google Sheets through MsgClub's plugin. No native one-click connector is needed.

What webhook events does the WhatsApp API send?

MsgClub sends message.sent, message.delivered, message.read and message.failed for messages you send, message.clicked for tracked button clicks, and message.received for every customer reply, with the message text or media link. Each event carries the message ID so you can match it to your record.

Can I send PDFs, images and buttons through the WhatsApp API?

Yes. You can send images, videos, audio and documents such as invoices, either as the header of a template or as a free-form message inside the service window. Inside the window you can also send up to 3 reply buttons or a list of up to 10 options, and receive the customer's choice by webhook.

Is there a sandbox or test number?

During onboarding we help you send test messages to your own numbers before you go live, so your developers can check templates, variables and webhooks. Ask our team for the current testing options when you request API access.

Start sending in minutes

Create a free account to test the panel and API, or talk to our team about volumes, DLT setup and CRM integration.