Prepseed logo
Home
WhatsApp
Automation BuilderCampaignsAI Support AgentTeam InboxLogin with WhatsApp
FeaturesSolutionsIndustriesPricingFAQBlog
Prepseed logo
Home
FeaturesSolutionsIndustriesPricingFAQBlog

Prepseed · WhatsApp Business API

WhatsApp Business API documentation — easiest REST integration

Prepseed 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 Prepseed account and connect WhatsAppRegister at Prepseed, 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: Prepseed 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 Prepseed. 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/Prepseed/nextjs-whatsapp-login-demo.

Example: list WhatsApp connections

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

Example: send a text message

curl -s -X POST "https://prepbot-api.prepseed.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": {
    "prepseed": {
      "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, usePrepseedWhatsAppLogin hook, and a reference Login button — talks to your backend proxy routes, not Prepseed 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_prepbot_dashboard
MESSLO_WA_LOGIN_WEBHOOK_SECRET=your_webhook_secret_from_app_create
MESSLO_API_BASE_URL=https://prepbot-api.prepseed.com
Next.js proxy routes (Node SDK)
import { PrepseedNodeSdk, nextAdapter } from "@getmesslo/messlo-node-sdk";

const sdk = new PrepseedNodeSdk({
  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 { usePrepseedWhatsAppLogin } from "@getmesslo/messlo-whatsapp-login/react";

const { startLogin, status, waLink, error } = usePrepseedWhatsAppLogin({
  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://prepbot-api.prepseed.com

WhatsApp Configuration

Handle WhatsApp account connections and numbers. Call these endpoints first to obtain waba_id and phone numbers. Marketing Messages API (MM Lite) settings control how MARKETING templates are sent.

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 MetaRefreshes phone numbers from Meta. Also re-syncs Marketing Messages API onboarding status.
GET/api/whatsapp/:wabaId/marketing-messagesGet Marketing Messages API settingsPer-WABA settings for Meta Marketing Messages API (MM Lite). MARKETING templates are routed to /marketing_messages when enabled (default).
PUT/api/whatsapp/:wabaId/marketing-messagesUpdate Marketing Messages API settingsproduct_policy CLOUD_API_FALLBACK sends via Cloud API when the WABA is not yet onboarded to MM API. STRICT fails instead of falling back.
POST/api/whatsapp/:wabaId/marketing-messages/sync-statusSync Marketing Messages onboarding statusFetches marketing_messages_onboarding_status from Meta. Runs automatically when you connect or sync a WABA.
GET/api/whatsapp/statusGet connection statusQuick boolean check for whether a phone number (or your first active one) is connected.
POST/api/whatsapp/connectConnect a WhatsApp numberManually register a Business API (Cloud API) or Baileys connection — most integrators use embedded signup instead of this.
GET/api/whatsapp/waba-listList WABAs (lightweight)Minimal WABA list (id, name, Meta account id, provider) — for pickers.
PUT/api/whatsapp/connect/:idUpdate a connectionRename or activate/deactivate a WABA or phone number — :id may be either a WABA id or a phone number id.
POST/api/whatsapp/deleteDelete connectionsBulk-delete WABAs and/or phone numbers by id; also soft-deletes chatbots linked to a deleted WABA.
POST/api/whatsapp/disconnectDisconnect a WhatsApp number
GET/api/whatsapp/baileys/qrcode/:wabaIdGet Baileys pairing QR codePoll this while a Baileys instance initializes to get the QR image to scan.
PUT/api/whatsapp/phone-numbers/:phoneNumberId/set-primarySet primary phone numberMarks one number primary and clears the flag on every other number you own.
POST/api/whatsapp/:wabaId/phone-numbers/registerRegister phone numbers with MetaCompletes Meta's two-step Cloud API phone registration (PIN) for any pending numbers on the WABA.
GET/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profileGet WhatsApp Business ProfileBusiness API (Cloud API) only — fetches the profile Meta shows to your customers plus display-name status.
POST/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profileUpdate WhatsApp Business ProfileUpdate profile fields and/or request a display-name change; returns the refreshed profile (same shape as the GET).
POST/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profile/pictureUpload Business Profile picture
POST/api/whatsapp/:wabaId/marketing-messages/applyApply for Marketing Messages onboardingStarts Meta's MM Lite onboarding for a Business API WABA; call sync-status afterwards to pick up the result.
POST/api/whatsapp/:wabaId/marketing-messages/embedded-signupComplete Marketing Messages embedded signupExchanges the Meta embedded-signup OAuth code for completed MM Lite onboarding.

Login with WhatsApp

Verify users via WhatsApp without OTP: create a Login app in Prepseed, then integrate with @getmesslo/messlo-node-sdk and @getmesslo/messlo-whatsapp-login (recommended) or call the REST endpoints below. Example app: github.com/Prepseed/nextjs-whatsapp-login-demo. Each Login app stores whether users message your WABA or Prepseed's shared number; Prepseed 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 Prepseed'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. Prepseed 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 Prepseed-signed JWT and receives the verified phone and profile name. Token is single-use. Issue your own app JWT/session after this call.
GET/api/whatsapp-login-appsList Login apps
POST/api/whatsapp-login-appsCreate a Login appIssues a dedicated API key (purpose: whatsapp_auth) and webhook secret for the new app — the API key is returned once, here only.
PATCH/api/whatsapp-login-apps/:idUpdate a Login app
POST/api/whatsapp-login-apps/:id/regenerate-webhook-secretRegenerate a Login app's webhook secret
POST/api/whatsapp-login-apps/deleteDelete Login apps

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/sendSend Media from Local Device
POST/api/whatsapp/sendUpload Document (URL)
POST/api/whatsapp/sendSend Audio via URL
POST/api/whatsapp/sendSend Video via URL
POST/api/whatsapp/sendSend Multiple Media via URLsSends multiple media files in sequence using public URLs.
POST/api/whatsapp/sendShare Location Info
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). MARKETING category templates are sent via Meta Marketing Messages API (/marketing_messages) when enabled on the WABA — UTILITY and AUTHENTICATION use standard Cloud API.
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
GET/api/whatsapp/logsList message logsPaginated, filterable log of every inbound/outbound message (for a debugging/audit view, not the chat thread UI).
GET/api/whatsapp/logs/billing-summaryMessage billing summarySpend and message counts grouped by Meta conversation category (marketing/utility/authentication/service) for a date range.
POST/api/whatsapp/clear-chatClear a chatDeletes every stored message with a contact (does not delete the contact) and posts a 'Chat cleared' system message.
POST/api/whatsapp/pin-chatPin / unpin a chat
GET/api/whatsapp/contact-profileGet contact profile panelEverything the chat sidebar shows for a contact: tags, notes, shared media by week, and the assigned agent.
POST/api/whatsapp/conversation-insightRefresh AI conversation insightForce-regenerates the AI-written conversation summary shown on the contact profile panel.
GET/api/whatsapp/contact-avatarGet contact avatarRedirects (302) to the contact's profile picture; returns 404 if none is available.
GET/api/chat/allList recent chats (agent inbox)chat.routes.js's own recent-chats aggregation (grouped by contact, newest message first); agents only see chats assigned to them.
POST/api/chat/add-tagTag a chat's contact
DELETE/api/chat/delete-tagRemove a tag from a chat's contact
POST/api/chat/add-noteAdd a chat note
DELETE/api/chat/delete-noteDelete chat notes
POST/api/chat/assignAssign a chatAssigns a contact's chat to a human agent or a chatbot (exactly one of agent_id/chatbot_id).
POST/api/chat/unassignUnassign a chat
POST/api/chat/statusUpdate chat statusMarks a contact's chat resolved/open/etc.; posts a system message and syncs any assignment's is_solved flag.

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/createOTP / Authentication Templatecategory must be AUTHENTICATION — enables OTP-specific fields and buttons.
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/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
GET/api/templatesList templates
GET/api/templates/meta-listList templates directly from MetaBypasses the local DB copy — useful to see templates created outside Prepseed before syncing them in.
GET/api/templates/:idGet one template
POST/api/templates/syncSync templates from MetaPulls specific Meta templates (or every pending-review one) into the local template list, mirroring remote header media locally.
POST/api/templates/suggestAI-suggest a template
PUT/api/templates/:idUpdate a templateSame field shape as Create (message_body, buttons, carousel_cards, otp fields, …) — only templates not yet submitted/approved can be edited. call_permission, is_limited_time_offer, offer_text, and has_expiration are create-only and silently no-op here.
DELETE/api/templates/:idDelete a template
POST/api/templates/migrateMigrate a template to another WABABoth WABAs must belong to the same Meta Business Manager.
GET/api/templates/admin-templates/listBrowse the admin template libraryPrepseed's curated, ready-to-use templates by sector/category — not your own workspace's templates.

Broadcast API

Launch and control bulk messaging campaigns.

MethodEndpointDescription
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)
GET/api/campaignsCampaign ListList existing campaigns and statuses before creating a new send.
GET/api/campaigns/:idGet one campaign
PUT/api/campaigns/:idUpdate a campaignOnly draft/scheduled campaigns can be edited freely; a sending/completed campaign only accepts expiration or name/description changes.
DELETE/api/campaigns/:idDelete a campaignOnly campaigns that haven't started sending can be deleted.
POST/api/campaigns/:id/sendSend a draft campaign
GET/api/campaign-stats/:campaignId/statsGet campaign statistics
GET/api/campaign-stats/:campaignId/stats/messagesGet campaign stats with per-recipient messages
POST/api/campaign-stats/update-from-messageRecompute campaign stats from a message
POST/api/campaign-stats/bulk-updateBulk recompute campaign stats
PATCH/api/message-status/:messageId/deliveryUpdate a message's delivery status
PATCH/api/message-status/:messageId/readUpdate a message's read status
POST/api/message-status/whatsapp/statusUpdate status by WhatsApp message id
PATCH/api/message-status/bulk/deliveryBulk mark messages delivered
PATCH/api/message-status/bulk/readBulk mark messages read
GET/api/message-status/user/:userId/statusMessage status summary for a user
POST/api/message-status/statusLook up status for specific messages

Automation flows

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

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
GET/api/automation/:flowIdGet one automation flow
PUT/api/automation/:flowIdUpdate an automation flow
DELETE/api/automation/:flowIdDelete an automation flow
GET/api/automation/templatesList built-in flow templatesBlueprint flows (nodes/connections pre-wired) you can instantiate with from-template instead of building from scratch.
POST/api/automation/from-templateCreate a flow from a template
GET/api/automation/statisticsAutomation statistics
GET/api/automation/executions/:executionIdGet one automation execution

AI Chatbots

Workspace-scoped AI chatbots: create/train/chat with a bot and manage its RAG knowledge sources (text, Q&A, website crawls, PDF/image uploads). chatbot.routes.js only — Keyword Triggers and Quick Replies are separate sections below.

MethodEndpointDescription
GET/api/chatbotsList chatbots
POST/api/chatbotsCreate a chatbot
GET/api/chatbots/:idGet one chatbot
PUT/api/chatbots/:idUpdate a chatbot
DELETE/api/chatbots/:idDelete a chatbotAlso soft-deletes its knowledge sources and removes their vectors from Qdrant.
POST/api/chatbots/:id/trainTrain a chatbotLegacy single-shot trainer: writes one Q&A or text knowledge source and re-queues it for RAG ingestion.
POST/api/chatbots/suggest-actionsSuggest smart actions
POST/api/chatbots/scrapeScrape a website for knowledgeStreams progress as Server-Sent Events, then a final 'complete' event with the extracted text.
POST/api/chatbots/extract-docExtract a document preview
GET/api/chatbots/usage/budgetChatbot usage / token budgetLegacy plan-era usage endpoint. Since there are no active subscription plans today, every account degrades to unlimited with no numeric counters.
POST/api/chatbots/:id/chatChat with a bot (test)
POST/api/chatbots/:id/chat/clearClear a test chat session
POST/api/chatbots/:id/migrate-ragMigrate legacy training to RAG sourcesOne-time migration for chatbots trained before knowledge sources existed.
GET/api/chatbots/:id/knowledge-sourcesList knowledge sources
GET/api/chatbots/:id/knowledge-sources/:sourceIdGet one knowledge source
POST/api/chatbots/:id/knowledge-sources/textAdd a text knowledge source
POST/api/chatbots/:id/knowledge-sources/qnaAdd a Q&A knowledge source
POST/api/chatbots/:id/knowledge-sources/websiteAdd a website knowledge source
POST/api/chatbots/:id/knowledge-sources/upload-urlGet a presigned upload URLPDF/image knowledge sources only; upload the file to the returned S3 URL, then call the upload endpoint with the same s3_key.
POST/api/chatbots/:id/knowledge-sources/uploadAdd a file knowledge sourceEither upload the file directly, or pass s3_key from the presigned-upload flow.
POST/api/chatbots/:id/knowledge-sources/estimateEstimate ingest token cost
DELETE/api/chatbots/:id/knowledge-sources/:sourceIdDelete a knowledge source
POST/api/chatbots/:id/knowledge-sources/:sourceId/reindexRe-index a knowledge source

Keyword Triggers

Auto-reply when an inbound message matches configured keywords (message-bot.routes.js — shown as 'Keyword Triggers' in the dashboard nav). reply_id points at a Template, ReplyMaterial, EcommerceCatalog, Chatbot, or agent User depending on reply_type.

MethodEndpointDescription
POST/api/message-botsCreate a keyword trigger
GET/api/message-botsList keyword triggers
GET/api/message-bots/:idGet one keyword trigger
PUT/api/message-bots/:idUpdate a keyword triggerSame fields as create; only provided fields are changed.
DELETE/api/message-bots/:idDelete a keyword trigger
POST/api/message-bots/bulk-deleteBulk delete keyword triggers

Quick Replies

Short canned messages agents insert into a chat with one click (quick-reply.routes.js). Distinct from Keyword Triggers (automatic) and Reply Materials (media/document library).

MethodEndpointDescription
GET/api/quick-repliesList quick repliesIncludes your own replies plus admin-provided ones, unless the user has disabled admin quick replies in settings.
GET/api/quick-replies/adminList admin quick replies
POST/api/quick-repliesCreate a quick reply
PUT/api/quick-replies/:idUpdate a quick reply
DELETE/api/quick-replies/deleteBulk delete quick replies
POST/api/quick-replies/:id/favoriteToggle favorite

Reply Materials

A media/document library (brochures, images, videos, flows) that Keyword Triggers and automation flows can send — a different resource from Quick Replies (reply-material.routes.js).

MethodEndpointDescription
POST/api/reply-materialsCreate a reply material
GET/api/reply-materialsList reply materialsReturns materials grouped by type, plus related pickers (approved templates, linked catalogs, chatbots, agents, sequences, published forms) for the same WABA.
POST/api/reply-materials/bulk-deleteBulk delete reply materials
GET/api/reply-materials/:idGet one reply material
PUT/api/reply-materials/:idUpdate a reply material
DELETE/api/reply-materials/:idDelete a reply material

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 forms
POST/api/formsCreate form
PATCH/api/forms/:id/publishPublish form
GET/api/forms/:idGet one form
PATCH/api/forms/:idUpdate a formOnly allowed while the form's Meta flow is still DRAFT; also re-syncs the Meta Flow asset if one already exists.
DELETE/api/forms/:idDelete a formDeletes the Meta Flow if it's still a draft, or deprecates it if published.
POST/api/forms/syncImport Meta Flows
POST/api/forms/sync-statusSync flow status from MetaRefreshes meta_status, fields, and payload for every form on a WABA from Meta.
POST/api/forms/migrateMigrate a form to another WABABoth WABAs must belong to the same Meta Business Manager.
GET/api/forms/templateGet a starter field templateReturns starter field templates for every category — there is currently no server-side filter by category.
GET/api/forms/meta-flows/:waba_idList raw Meta Flows for a WABADirect Graph API passthrough — every flow on the WABA, imported into Prepseed or not.
GET/api/submissions/:form_idList a form's submissionsMounted separately at /api/submissions, not under /api/forms.
GET/api/submissions/:id/detailsGet one submissionMarks the submission viewed the first time it's fetched.
DELETE/api/submissions/:idDelete a submission

Commerce & checkout

Meta catalogs, order webhooks from your e-commerce platform, 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
GET/api/ecommerce-catalog/waba/:waba_id/catalogsList catalogs synced for a WABA
POST/api/ecommerce-catalog/link-catalogLink a catalog to a WABAUnlinks any catalog currently linked to the WABA on Meta before linking the new one.
GET/api/ecommerce-catalog/waba/:waba_id/linked-catalogsList linked catalogs
POST/api/ecommerce-catalog/catalog/:catalog_id/productsCreate a product in a catalog
PUT/api/ecommerce-catalog/catalog/:catalog_id/products/:product_idUpdate a productproduct_id is the Meta catalog product id, not the Prepseed document id.
DELETE/api/ecommerce-catalog/catalog/:catalog_id/products/:product_idDelete a product
GET/api/ecommerce-catalog/user/catalogsList catalogs across the accountNot scoped to a single WABA.
GET/api/ecommerce-catalog/user/productsList products across the account
GET/api/ecommerce-webhook/listList order webhooks
GET/api/ecommerce-webhook/:idGet one webhookThe signing secret itself is never returned — only whether one is set (has_secret) and where it's expected.
PUT/api/ecommerce-webhook/:idUpdate a webhook
DELETE/api/ecommerce-webhook/:idDelete a webhook
PATCH/api/ecommerce-webhook/:id/toggleToggle a webhook
GET/api/ecommerce-webhook/:id/statsGet webhook stats
GET/api/ecommerce-webhook/:id/trigger-logsGet webhook trigger logs
GET/api/ecommerce-webhook/:id/message-logsGet webhook message logsThe WhatsApp messages this webhook actually sent, as opposed to the raw inbound payloads in trigger-logs.
PUT/api/ecommerce-webhook/:id/merchant-notificationsConfigure merchant notificationsSends an internal WhatsApp alert to your own team whenever this webhook fires, using an approved template.

WABA Configuration

Per-WABA automatic-reply routing — which template, reply or chatbot fires for after-hours messages, first contact, delayed replies, fallback and re-engagement. Distinct from Working Hours, which defines the hours themselves.

MethodEndpointDescription
GET/api/waba-configurations/:waba_idGet WABA configurationFetches (creating a blank one if needed) the auto-reply configuration for a WABA.
PUT/api/waba-configurations/:waba_idUpdate WABA configurationSets which template/reply/chatbot fires for each automatic-reply scenario on a WABA.

Event Notifications

Subscribe your own server to receive outbound webhook events — new message, new contact, campaign completed — pushed from a workspace as they happen.

MethodEndpointDescription
GET/api/workspaces/:workspaceId/webhooksList webhook subscriptionsLists the outbound webhook subscriptions configured for a workspace.
POST/api/workspaces/:workspaceId/webhooksCreate webhook subscriptionRegisters a URL on your server to receive workspace events; the signing secret is returned once and never shown again.
PATCH/api/workspaces/:workspaceId/webhooks/:idUpdate webhook subscriptionUpdates a webhook's URL, subscribed events, secret placement or enabled state.
DELETE/api/workspaces/:workspaceId/webhooks/:idDelete webhook subscriptionRemoves a webhook subscription.
POST/api/workspaces/:workspaceId/webhooks/:id/testSend test eventQueues a synthetic event delivery to this webhook, useful for verifying your endpoint and signature check.

202 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 Prepseed’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. Prepseed 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 Prepseed dashboard (choose your WhatsApp Business number or Prepseed'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/Prepseed/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 your e-commerce platform's order webhooks.

Integration Tools

REST API v1

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. Marketing Messages API (MM Lite) settings control how MARKETING templates are sent.

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.
  4. 4Optional: GET /api/whatsapp/:wabaId/marketing-messages — MM API is enabled by default; MARKETING templates use Meta's optimized send path.

On this page · 22

01

Fetch WABA Connections

GEThttps://prepbot-api.prepseed.com/api/whatsapp/connectionsAPI key required

Parameters

workspace_id
string

Limit to the WABA connected to this workspace (a workspace has at most one). Can also be sent as the X-Workspace-Id header. Omit for every WABA on the account.

Request & response

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

Fetch All Phone Numbers

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

Request & response

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

Fetch WABA-Specific Phone Numbers

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

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

Parameters

page
number

e.g. 1

Page number.

limit
number

e.g. 30

Results per page (default 30, max 100).

sync
boolean

Force re-fetch of phone metadata from Meta instead of cache.

Request & response

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

Setup WABA webhooks (Meta)

POSThttps://prepbot-api.prepseed.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://prepbot-api.prepseed.com/api/whatsapp/:wabaId/webhooks/setup' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
05

Sync workspace from Meta

POSThttps://prepbot-api.prepseed.com/api/whatsapp/workspace/syncAPI key required

Refreshes phone numbers from Meta. Also re-syncs Marketing Messages API onboarding status.

Parameters

workspace_id
string

Workspace to sync; defaults to the workspace resolved from request context if omitted.

Request & response

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

Get Marketing Messages API settings

GEThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messagesAPI key required

Per-WABA settings for Meta Marketing Messages API (MM Lite). MARKETING templates are routed to /marketing_messages when enabled (default).

Request & response

bash
curl -X GET 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messages' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
07

Update Marketing Messages API settings

PUThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messagesAPI key required

product_policy CLOUD_API_FALLBACK sends via Cloud API when the WABA is not yet onboarded to MM API. STRICT fails instead of falling back.

Parameters

enabled
boolean

Turn Marketing Messages routing on/off.

product_policy
enum

Fallback behavior when WABA isn't onboarded to MM API.

Allowed values

CLOUD_API_FALLBACKSend via Cloud API when not onboarded to MM APISTRICTFail instead of falling back
activity_sharing
boolean

Share activity data with Meta.

Request & response

bash
curl -X PUT 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messages' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "enabled": true,
  "product_policy": "CLOUD_API_FALLBACK",
  "activity_sharing": null
}'
08

Sync Marketing Messages onboarding status

POSThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messages/sync-statusAPI key required

Fetches marketing_messages_onboarding_status from Meta. Runs automatically when you connect or sync a WABA.

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messages/sync-status' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
09

Get connection status

GEThttps://prepbot-api.prepseed.com/api/whatsapp/statusAPI key required

Quick boolean check for whether a phone number (or your first active one) is connected.

Parameters

whatsapp_phone_number_id
string

Check a specific phone number's connection instead of your first active one.

Use phone_numbers[].id

Get this value from:

provider
enum

Filter by provider.

Allowed values

business_apiMeta Cloud APIbaileysBaileys

Request & response

bash
curl -X GET 'https://prepbot-api.prepseed.com/api/whatsapp/status' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
10

Connect a WhatsApp number

POSThttps://prepbot-api.prepseed.com/api/whatsapp/connectAPI key required

Manually register a Business API (Cloud API) or Baileys connection — most integrators use embedded signup instead of this.

Parameters

provider
enum

e.g. business_api

Connection type.

Allowed values

business_apiMeta Cloud API — requires the fields belowbaileysQR-paired personal WhatsApp — requires only instance_name
phone_number_idrequired
string

Meta phone_number_id.

When: provider = business_api

access_tokenrequired
string

Meta system-user access token for the WABA.

When: provider = business_api

whatsapp_business_account_idrequired
string

Meta WABA ID.

When: provider = business_api

app_idrequired
string

Meta app ID used to onboard this WABA.

When: provider = business_api

workspace_idrequired
string

Workspace to attach this connection to.

registred_phone_number
string

Display phone number (E.164).

business_id
string

Meta Business Manager ID, resolved automatically if omitted.

name
string

Display name for the WABA/instance; falls back to registred_phone_number (business_api) or used as instance name fallback (baileys).

instance_namerequired
string

Friendly name for the Baileys instance.

When: provider = baileys

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/connect' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "business_api",
  "phone_number_id": "123456789012345",
  "access_token": "EAAG...",
  "whatsapp_business_account_id": "1248119146671221",
  "app_id": "987654321",
  "workspace_id": "64a1workspace01",
  "registred_phone_number": "+911234567890"
}'
11

List WABAs (lightweight)

GEThttps://prepbot-api.prepseed.com/api/whatsapp/waba-listAPI key required

Minimal WABA list (id, name, Meta account id, provider) — for pickers.

Request & response

bash
curl -X GET 'https://prepbot-api.prepseed.com/api/whatsapp/waba-list' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
12

Update a connection

PUThttps://prepbot-api.prepseed.com/api/whatsapp/connect/:idAPI key required

Rename or activate/deactivate a WABA or phone number — :id may be either a WABA id or a phone number id.

Parameters

name
string

New display name.

is_active
boolean

Setting true deactivates every other connection/number on the same account/WABA.

Request & response

bash
curl -X PUT 'https://prepbot-api.prepseed.com/api/whatsapp/connect/:id' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Support Line",
  "is_active": true
}'
13

Delete connections

POSThttps://prepbot-api.prepseed.com/api/whatsapp/deleteAPI key required

Bulk-delete WABAs and/or phone numbers by id; also soft-deletes chatbots linked to a deleted WABA.

Parameters

idsrequired
array

WABA and/or phone number document ids.

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/delete' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "ids": [
    "64a1waba01",
    "64a1phone02"
  ]
}'
14

Disconnect a WhatsApp number

POSThttps://prepbot-api.prepseed.com/api/whatsapp/disconnectAPI key required

Parameters

providerrequired
enum

Which connection type to disconnect.

Allowed values

business_apiMeta Cloud APIbaileysBaileys
waba_idrequired
string

WABA to disconnect.

Use connections[].id or whatsapp_business_account_id

Get this value from:

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/disconnect' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "business_api",
  "waba_id": "64a1waba01"
}'
15

Get Baileys pairing QR code

GEThttps://prepbot-api.prepseed.com/api/whatsapp/baileys/qrcode/:wabaIdAPI key required

Poll this while a Baileys instance initializes to get the QR image to scan.

Parameters

sync_chat
boolean

Also import chat history once paired.

Request & response

bash
curl -X GET 'https://prepbot-api.prepseed.com/api/whatsapp/baileys/qrcode/:wabaId' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
16

Set primary phone number

PUThttps://prepbot-api.prepseed.com/api/whatsapp/phone-numbers/:phoneNumberId/set-primaryAPI key required

Marks one number primary and clears the flag on every other number you own.

Request & response

bash
curl -X PUT 'https://prepbot-api.prepseed.com/api/whatsapp/phone-numbers/:phoneNumberId/set-primary' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
17

Register phone numbers with Meta

POSThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/phone-numbers/registerAPI key required

Completes Meta's two-step Cloud API phone registration (PIN) for any pending numbers on the WABA.

Parameters

pin
string

6-digit two-step verification PIN for the number, if already set.

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/phone-numbers/register' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "pin": "123456"
}'
18

Get WhatsApp Business Profile

GEThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profileAPI key required

Business API (Cloud API) only — fetches the profile Meta shows to your customers plus display-name status.

Request & response

bash
curl -X GET 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profile' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
19

Update WhatsApp Business Profile

POSThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profileAPI key required

Update profile fields and/or request a display-name change; returns the refreshed profile (same shape as the GET).

Parameters

about
string

Short status line.

address
string

Business address.

description
string

Business description.

email
string

Support email.

websites
array

Up to 2 website URLs.

vertical
string

Business category, e.g. RETAIL, EDU.

new_display_name
string

Requests a new verified display name from Meta (separate review).

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profile' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "about": "We reply within 1 hour",
  "email": "support@example.com"
}'
20

Upload Business Profile picture

POSThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profile/pictureAPI key required

Parameters

filerequired
file

JPEG/PNG image.

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/phone-numbers/:phoneNumberId/business-profile/picture' \
  -H 'X-API-Key: YOUR_API_KEY'
21

Apply for Marketing Messages onboarding

POSThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messages/applyAPI key required

Starts Meta's MM Lite onboarding for a Business API WABA; call sync-status afterwards to pick up the result.

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messages/apply' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'
22

Complete Marketing Messages embedded signup

POSThttps://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messages/embedded-signupAPI key required

Exchanges the Meta embedded-signup OAuth code for completed MM Lite onboarding.

Parameters

coderequired
string

OAuth code returned by Meta's embedded signup JS SDK.

Request & response

bash
curl -X POST 'https://prepbot-api.prepseed.com/api/whatsapp/:wabaId/marketing-messages/embedded-signup' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "AQD...meta-oauth-code"
}'

Your customers are on WhatsApp. Meet them there.

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

Prepseed logo

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

Navigate

  • Blog

Products

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

Contact

  • API documentation
  • Sign In

© 2026 Prepseed. All rights reserved.

Made with love ❤️ by Indian for World