Messlo logo
Home

Features

Automation Builder

AI-powered, human like chatbots for every use case

Campaigns

Send personalized campaigns with best delivery rates

AI Support Agent

Respond to and resolve queries instantly & custom support

Login with WhatsApp

WhatsApp OTP API alternative—phone verification & login API

Team Inbox

Win customers with all sales & service chats in one place

Instagram & Facebook messenger

Stay connected with your customers 24*7

Coming Soon
WhatsApp Business Calling

Turn WhatsApp into your full-fledged voice channel

Coming Soon

Integrations

Overview & Webhooks
Library
FeaturesSolutionsIndustriesPricingFAQ
Messlo logo
Home
FeaturesSolutionsIndustriesPricingFAQ

Messlo · WhatsApp Business API

WhatsApp Business API documentation — easiest REST integration

Messlo provides a developer-friendly REST API on top of the official WhatsApp Business Platform (Cloud API). Integrate WhatsApp messaging into your product, CRM, or automation stack without building Meta infrastructure from scratch.

Use this page as your complete WhatsApp API reference: authentication, endpoint list, request examples, and copy-ready cURL commands. Sign up free to generate an API key and test endpoints from the browser.

Quick startAll endpointsFAQLogin with WhatsApp guideLogin SDKsLogin API referenceCursor MCPInteractive referencellms.txt

Quick start — implement WhatsApp API in minutes

  1. Create a Messlo account and connect WhatsAppRegister at Messlo, connect your WhatsApp Business Account (WABA), and verify your phone number in the dashboard.
  2. Generate an API keyOpen Integration Tools → API Credentials and create a key. Store it securely — it is shown only once.
  3. Optional: Messlo MCP in CursorInstall @getmesslo/messlo-mcp in Cursor MCP settings (see Integration Tools → Cursor MCP). Ask the AI to create templates, API keys, or check integration status.
  4. Call the REST API with your keySend the X-API-Key header (or Authorization: ApiKey <key>) on every request. Start with GET /api/whatsapp/connections to list your WABA IDs.
  5. Send your first messagePOST to /api/whatsapp/send with phone_number_id, recipient, and message payload. Use approved templates for outbound marketing outside the 24-hour window.
  6. Optional: Login with WhatsAppCreate a Login app in Messlo. Use npm packages @getmesslo/messlo-node-sdk (backend) and @getmesslo/messlo-whatsapp-login (React/Next.js), or call REST directly. See /developers#whatsapp-auth and the demo at github.com/GetMesslo/nextjs-whatsapp-login-demo.

Example: list WhatsApp connections

curl -s -X GET "https://api.messlo.com/api/whatsapp/connections" \
  -H "X-API-Key: YOUR_API_KEY"

Example: send a text message

curl -s -X POST "https://api.messlo.com/api/whatsapp/send" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"contact_no":"919876543210","whatsapp_phone_number":"911234567890","messageType":"text","message":"Hello!"}'

Create a free account to get an API key and test requests in the browser.

Cursor MCP — build with AI in your IDE

Install @getmesslo/messlo-mcp in Cursor (or any MCP-compatible editor) to create API keys, templates, automation flows, checkout webhooks, and Login apps using natural language. Use messlo_plan_integration with goals like inbound_automation, ecommerce_checkout, or industry_pack_onboarding. After sign-in, open Integration Tools → Cursor MCP for config and example prompts.

{
  "mcpServers": {
    "messlo": {
      "command": "npx",
      "args": ["-y", "@getmesslo/messlo-mcp"],
      "env": {
        "MESSLO_API_KEY": "your_api_key_here"
      }
    }
  }
}

Login with WhatsApp — official SDKs & demo

Prefer npm packages over raw REST. Use @getmesslo/messlo-node-sdk on your backend and @getmesslo/messlo-whatsapp-login in React or Next.js. Clone the Next.js demo for a working full-stack reference.

Official npm packages & demo

Ship Login with WhatsApp faster using our published SDKs. Your API key and webhook secret stay on the server; the client SDK calls your proxy routes only.

Backend@getmesslo/messlo-node-sdkNode.js SDK for your backend: start sessions, poll status, verify tokens, proxy SSE, and verify webhook HMAC — API key stays server-side.npmReact / Next.js@getmesslo/messlo-whatsapp-loginReact / Next.js client SDK: typed client, useMessloWhatsAppLogin hook, and a reference Login button — talks to your backend proxy routes, not Messlo directly.npmExampleNext.js full-stack demoClone-ready example with App Router API routes (start, status, SSE events), webhook handler, and a working Login with WhatsApp UI.GitHub
npm install @getmesslo/messlo-node-sdknpm install @getmesslo/messlo-whatsapp-loginOpen demo repo
Backend (.env)
MESSLO_WA_LOGIN_API_KEY=your_api_key_from_messlo_dashboard
MESSLO_WA_LOGIN_WEBHOOK_SECRET=your_webhook_secret_from_app_create
MESSLO_API_BASE_URL=https://api.messlo.com
Next.js proxy routes (Node SDK)
import { MessloNodeSdk, nextAdapter } from "@getmesslo/messlo-node-sdk";

const sdk = new MessloNodeSdk({
  apiKey: process.env.MESSLO_WA_LOGIN_API_KEY!,
  baseUrl: process.env.MESSLO_API_BASE_URL,
});

// app/api/auth/whatsapp-login/start/route.ts
export const POST = nextAdapter.startRoute(sdk);

// app/api/auth/whatsapp-login/status/[sessionId]/route.ts
export const GET = nextAdapter.statusRoute(sdk);

// app/api/auth/whatsapp-login/events/[sessionId]/route.ts
export const GET = nextAdapter.eventsRoute(sdk);
React hook (client SDK)
import { useMessloWhatsAppLogin } from "@getmesslo/messlo-whatsapp-login/react";

const { startLogin, status, waLink, error } = useMessloWhatsAppLogin({
  basePath: "/api/auth/whatsapp-login",
  onVerified: async (verificationToken) => {
    await fetch("/api/auth/session", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ verificationToken }),
    });
  },
});

Complete WhatsApp REST API endpoint reference

All endpoints use HTTPS and API key authentication. Base URL: https://api.messlo.com

WhatsApp Configuration

Handle WhatsApp account connections and numbers. Call these endpoints first to obtain waba_id and phone numbers.

MethodEndpointDescription
GET/api/whatsapp/connectionsFetch WABA Connections
GET/api/whatsapp/phone-numbersFetch All Phone Numbers
GET/api/whatsapp/:wabaId/phone-numbersFetch WABA-Specific Phone NumbersReplace :wabaId with your WABA document ID or Meta business account ID.
POST/api/whatsapp/:wabaId/webhooks/setupSetup WABA webhooks (Meta)Subscribe Meta webhooks for inbound messages and delivery events. Business API (Cloud API) only — run after connecting WABA.
POST/api/whatsapp/workspace/syncSync workspace from Meta

Login with WhatsApp

Verify users via WhatsApp without OTP: create a Login app in Messlo, then integrate with @getmesslo/messlo-node-sdk and @getmesslo/messlo-whatsapp-login (recommended) or call the REST endpoints below. Example app: github.com/GetMesslo/nextjs-whatsapp-login-demo. Each Login app stores whether users message your WABA or Messlo's shared number; Messlo returns a verification JWT — validate it on your server and issue your own session.

MethodEndpointDescription
POST/v1/auth/whatsapp/startStart auth sessionCreates a pending session and returns a wa.me deep link. The user must send the pre-filled LOGIN message from their WhatsApp app. Optional phone_number_id selects which connected number receives the login message (defaults to primary active Cloud API phone). Set use_messlo_phone to true to use Messlo's shared number instead — mutually exclusive with phone_number_id.
GET/v1/auth/whatsapp/events/:sessionId?token={subscribeToken}Listen for verification (SSE)Open a Server-Sent Events stream using subscribeToken from /start. Messlo pushes verified when Meta webhook receives the user's LOGIN message — preferred over polling at scale.
GET/v1/auth/whatsapp/status/:sessionIdGet verification token (optional poll)One-shot or fallback poll after SSE verified (or if you cannot use SSE). Returns verificationToken when the session is success.
POST/v1/auth/verify-tokenVerify token (server-side)Your backend validates the Messlo-signed JWT and receives the verified phone and profile name. Token is single-use. Issue your own app JWT/session after this call.

Contact Management System

Organize contacts and their associations.

MethodEndpointDescription
GET/api/contactsList Contacts
POST/api/contactsCreate Contact

Interactive Messaging API

Deliver engaging messages to your contacts

MethodEndpointDescription
POST/api/whatsapp/sendSend Text MessageNote: `contact_no` is the receiver's phone number, and `whatsapp_phone_number` is the sender's registered phone number. Ensure that a WABA is connected with this sender number for the request to work.
POST/api/whatsapp/sendUpload Image (URL)
POST/api/whatsapp/sendUpload Document (URL)
POST/api/whatsapp/sendSend Video via URL
POST/api/whatsapp/sendShare Location Info
POST/api/whatsapp/sendSend Multiple Media via URLsSends multiple media files in sequence using public URLs.
POST/api/whatsapp/sendSend approved templateSend a Meta-approved template. Use mediaUrl for a dynamic document/image header per message (e.g. invoice PDF URL at checkout).
POST/api/whatsapp/sendSend Media from Local Device
GET/api/whatsapp/chatsList recent chatsInbox threads for debugging automations.
GET/api/whatsapp/messagesList messages in threadQuery: contact_id (from chats or contacts).
POST/api/whatsapp/assign-chatAssign chat to agent
POST/api/whatsapp/sendSend Audio via URL

Messaging Templates API

Manage and send predefined WhatsApp message templates.

MethodEndpointDescription
POST/api/template/createSimple TemplateStart here — basic MARKETING template with body and optional footer.
POST/api/template/createTemplate with Variables
POST/api/template/createTemplate with Quick Reply Buttons
POST/api/template/createTemplate with CTA Buttons
POST/api/template/createTemplate with Coupon Code
POST/api/template/createOTP / Authentication Templatecategory must be AUTHENTICATION — enables OTP-specific fields and buttons.
POST/api/template/createLimited Time Offer Template
POST/api/template/createTemplate with Catalog Button
POST/api/template/createTemplate with Call Permission
POST/api/template/createCarousel Template
POST/api/template/createTemplate with document header (URL)Use a public HTTPS URL for the sample PDF/image/video header. Meta requires the URL to be reachable at create time.
POST/api/template/validate-media-urlValidate template media URL
POST/api/template/sync-statusSync template approval status

Broadcast API

Launch and control bulk messaging campaigns.

MethodEndpointDescription
GET/api/campaignsCampaign ListList existing campaigns and statuses before creating a new send.
POST/api/campaignsSetup Campaign (All Contacts)Simplest broadcast — sends an approved template to every contact.
POST/api/campaignsSetup Campaign (Specific Contacts)
POST/api/campaignsSetup Scheduled Campaign (By Tags)
POST/api/campaignsSetup Campaign with Media
POST/api/campaignsSetup Campaign with Dynamic Coupon
POST/api/campaignsSetup Campaign for Limited Time Offer
POST/api/campaignsSetup Campaign with Product Carousel
POST/api/campaignsSetup Campaign with Media Carousel
POST/api/campaignsSetup Campaign with Media Carousel (Local Files)

Automation flows

WhatsApp bot flows as JSON (nodes, connections, triggers). Build in the dashboard or use @getmesslo/messlo-mcp (messlo_compose_automation_flow, industry packs).

MethodEndpointDescription
GET/api/automationList automation flows
GET/api/automation/node-typesNode types catalogAll valid node types and parameters for flow JSON.
POST/api/automationCreate automation flow
PATCH/api/automation/:flowId/toggleToggle flow active
POST/api/automation/:flowId/testTest flow
GET/api/automation/:flowId/executionsList executions

CRM: segments, tags & custom fields

Organize contacts for automations (add_to_segment, add_tag, update_contact nodes) and broadcast campaigns.

MethodEndpointDescription
GET/api/segmentsList segments
POST/api/segmentsCreate segment
GET/api/tagsList tags
POST/api/tagsCreate tag
GET/api/custom-fieldsList custom fields
PUT/api/contacts/:idUpdate contact

AI chatbots & keyword bots

AI assistants (assign_chatbot nodes) and keyword auto-replies (message bots). Quick replies are agent inbox shortcuts.

MethodEndpointDescription
GET/api/chatbotsList chatbotsQuery: waba_id (required).
POST/api/chatbotsCreate chatbot
POST/api/chatbots/:id/trainTrain chatbot (Q&A)
GET/api/message-botsList message botsQuery: waba_id (required).
POST/api/message-botsCreate message bot
GET/api/quick-repliesList quick replies

WhatsApp Flow forms

Meta Flow lead forms. In automations, form_flow nodes use flow.flow_id from GET form (not the MongoDB form _id).

MethodEndpointDescription
GET/api/formsList formsQuery: waba_id (required).
POST/api/formsCreate form
PATCH/api/forms/:id/publishPublish form

Industry packs

One-shot vertical onboarding: CRM fields, tags, segments, automation flows, and chatbot presets per industry.

MethodEndpointDescription
GET/api/industry-packs/publicList public packs
GET/api/industry-packs/public/:slug/previewPreview packOptional query: company_name, city, etc.
POST/api/industry-packs/applyApply pack

Ops & integrations

Agents, drip sequences, Google Sheets/Calendar, plan usage, kanban pipelines, and bulk imports.

MethodEndpointDescription
GET/api/subscriptions/usageSubscription usage
GET/api/agent/allList agents
POST/api/whatsapp/assign-chatAssign chat to agent
GET/api/google/connectGoogle OAuth connectReturns URL to connect Google account.
GET/api/sequencesList sequencesQuery: waba_id (required).
GET/api/kanban-funnelsList kanban funnels

Commerce & checkout

Meta catalogs, order webhooks (Shopify/WooCommerce), and template sends with dynamic header media (e.g. per-order PDF via mediaUrl).

MethodEndpointDescription
POST/api/ecommerce-catalog/waba/:waba_id/sync-catalogsSync WABA catalogs
GET/api/ecommerce-catalog/catalog/:catalog_id/productsList catalog products
POST/api/ecommerce-webhook/createCreate order webhook
POST/api/ecommerce-webhook/:id/map-templateMap template to webhook
POST/api/whatsapp/sendSend template with dynamic PDF header

81 documented endpoints across messaging, contacts, templates, and campaigns.

Frequently asked questions — WhatsApp API integration

What is the easiest way to implement the WhatsApp Business API?
Use Messlo’s REST API: connect your WABA once in the dashboard, generate an API key, and call documented endpoints with standard HTTP tools (cURL, Postman, or any SDK). You avoid direct Meta app review complexity for common messaging, contacts, templates, and campaigns.
How do I send a WhatsApp message via API?
Authenticate with X-API-Key, obtain your phone_number_id from GET /api/whatsapp/phone-numbers, then POST to /api/whatsapp/send (session messages) or use template endpoints for marketing and notifications.
Is this the official WhatsApp Business API?
Yes. Messlo integrates with the WhatsApp Business Platform (Cloud API). Your messages are sent through your connected WABA and comply with Meta’s messaging policies and template rules.
How does API authentication work?
Include your API key in the X-API-Key header or as Authorization: ApiKey <your_key>. JWT Bearer tokens are used for dashboard sessions; server-to-server integrations should use API keys.
Can I send bulk WhatsApp messages or campaigns via API?
Yes. Use the Broadcast API to create campaigns, attach an approved template, and send to contact lists or segments. List campaigns with GET /api/campaigns before creating new sends.
How does Login with WhatsApp work?
Create a Login app in the Messlo dashboard (choose your WhatsApp Business number or Messlo's shared number). Use @getmesslo/messlo-node-sdk and @getmesslo/messlo-whatsapp-login for production integrations, or call POST /v1/auth/whatsapp/start with your app API key to get a waLink. The user sends the pre-filled LOGIN message on WhatsApp. Listen via SSE on GET /v1/auth/whatsapp/events/:sessionId or poll GET /status until you receive verificationToken, then POST /v1/auth/verify-token on your backend. Full guide: /developers/login-with-whatsapp. Example repo: github.com/GetMesslo/nextjs-whatsapp-login-demo.
Are there official SDKs for Login with WhatsApp?
Yes. @getmesslo/messlo-node-sdk provides backend helpers and Next.js/Express route adapters. @getmesslo/messlo-whatsapp-login provides a React hook and UI components for your frontend (via your proxy routes). See npmjs.com/package/@getmesslo/messlo-node-sdk and npmjs.com/package/@getmesslo/messlo-whatsapp-login.
Where can LLMs and tools find a summary of this API?
A machine-readable summary is available at /llms.txt on this site, alongside this HTML documentation page. Install @getmesslo/messlo-mcp in Cursor for natural-language setup (messlo_plan_integration goals: inbound_automation, ecommerce_checkout, industry_pack_onboarding, and more).
How do I build WhatsApp automation flows via API?
POST /api/automation with nodes, connections, and triggers (typically message_received). GET /api/automation/node-types for the full node catalog. Use PATCH /api/automation/:flowId/toggle to activate. Cursor users can use messlo_compose_automation_flow or apply an industry pack via POST /api/industry-packs/apply.
How do I send order confirmations with a dynamic PDF header?
Create a template with a public header_url sample (document type) via POST /api/template/create, wait for Meta approval, then POST /api/whatsapp/send with messageType template and mediaUrl set to the per-order PDF URL. Alternatively, use POST /api/ecommerce-webhook/create and map-template for Shopify or WooCommerce order webhooks.

Integration Tools

REST API v1

API TYPES

API Documentation v1.0

Interactive reference

API & Integration Guide

Explore endpoints and cURL examples. Sign in to generate your API key.

Sign InGet API key

API Reference

WhatsApp Configuration

Handle WhatsApp account connections and numbers. Call these endpoints first to obtain waba_id and phone numbers.

Authentication

Include your API key on every request using one of these headers.

Recommended first

  1. 1Call GET /api/whatsapp/connections to list WABA accounts.
  2. 2Call GET /api/whatsapp/phone-numbers for sender numbers.
  3. 3Use waba_id and phone numbers in messaging, templates, and campaigns.
01

Fetch WABA Connections

GEThttps://api.messlo.com/api/whatsapp/connectionsAPI key required

Request & response

bash
curl -X GET 'https://api.messlo.com/api/whatsapp/connections' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
02

Fetch All Phone Numbers

GEThttps://api.messlo.com/api/whatsapp/phone-numbersAPI key required

Request & response

bash
curl -X GET 'https://api.messlo.com/api/whatsapp/phone-numbers' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
03

Fetch WABA-Specific Phone Numbers

GEThttps://api.messlo.com/api/whatsapp/:wabaId/phone-numbersAPI key required

Replace :wabaId with your WABA document ID or Meta business account ID.

Request & response

bash
curl -X GET 'https://api.messlo.com/api/whatsapp/:wabaId/phone-numbers' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
04

Setup WABA webhooks (Meta)

POSThttps://api.messlo.com/api/whatsapp/:wabaId/webhooks/setupAPI key required

Subscribe Meta webhooks for inbound messages and delivery events. Business API (Cloud API) only — run after connecting WABA.

Request & response

bash
curl -X POST 'https://api.messlo.com/api/whatsapp/:wabaId/webhooks/setup' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
05

Sync workspace from Meta

POSThttps://api.messlo.com/api/whatsapp/workspace/syncAPI key required

Request & response

bash
curl -X POST 'https://api.messlo.com/api/whatsapp/workspace/sync' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'

Your customers are on WhatsApp. Meet them there.

Start your free trial and see how easy WhatsApp marketing can be.

Messlo logo

WhatsApp marketing, team inbox, and automation — built for growing businesses.

Navigate

Products

  • Automation Builder
  • Campaigns
  • AI Support Agent
  • Team Inbox
  • Login with WhatsApp
  • Messlo for Startups

Contact

  • Pricing
  • API documentation
  • Sign In

© 2026 Messlo. All rights reserved.

Made with love ❤️ by Indian for World