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 start — implement WhatsApp API in minutes
- Create a Prepseed account and connect WhatsAppRegister at Prepseed, connect your WhatsApp Business Account (WABA), and verify your phone number in the dashboard.
- Generate an API keyOpen Integration Tools → API Credentials and create a key. Store it securely — it is shown only once.
- 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.
- 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.
- 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.
- 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.
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.comimport { 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);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.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/whatsapp/connections | Fetch WABA Connections |
| GET | /api/whatsapp/phone-numbers | Fetch All Phone Numbers |
| GET | /api/whatsapp/:wabaId/phone-numbers | Fetch WABA-Specific Phone NumbersReplace :wabaId with your WABA document ID or Meta business account ID. |
| POST | /api/whatsapp/:wabaId/webhooks/setup | Setup 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/sync | Sync workspace from MetaRefreshes phone numbers from Meta. Also re-syncs Marketing Messages API onboarding status. |
| GET | /api/whatsapp/:wabaId/marketing-messages | Get 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-messages | Update 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-status | Sync Marketing Messages onboarding statusFetches marketing_messages_onboarding_status from Meta. Runs automatically when you connect or sync a WABA. |
| GET | /api/whatsapp/status | Get connection statusQuick boolean check for whether a phone number (or your first active one) is connected. |
| POST | /api/whatsapp/connect | Connect a WhatsApp numberManually register a Business API (Cloud API) or Baileys connection — most integrators use embedded signup instead of this. |
| GET | /api/whatsapp/waba-list | List WABAs (lightweight)Minimal WABA list (id, name, Meta account id, provider) — for pickers. |
| PUT | /api/whatsapp/connect/:id | Update 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/delete | Delete connectionsBulk-delete WABAs and/or phone numbers by id; also soft-deletes chatbots linked to a deleted WABA. |
| POST | /api/whatsapp/disconnect | Disconnect a WhatsApp number |
| GET | /api/whatsapp/baileys/qrcode/:wabaId | Get Baileys pairing QR codePoll this while a Baileys instance initializes to get the QR image to scan. |
| PUT | /api/whatsapp/phone-numbers/:phoneNumberId/set-primary | Set primary phone numberMarks one number primary and clears the flag on every other number you own. |
| POST | /api/whatsapp/:wabaId/phone-numbers/register | Register 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-profile | Get 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-profile | Update 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/picture | Upload Business Profile picture |
| POST | /api/whatsapp/:wabaId/marketing-messages/apply | Apply 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-signup | Complete 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.
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/auth/whatsapp/start | Start 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/:sessionId | Get 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-token | Verify 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-apps | List Login apps |
| POST | /api/whatsapp-login-apps | Create 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/:id | Update a Login app |
| POST | /api/whatsapp-login-apps/:id/regenerate-webhook-secret | Regenerate a Login app's webhook secret |
| POST | /api/whatsapp-login-apps/delete | Delete Login apps |
Interactive Messaging API
Deliver engaging messages to your contacts
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/whatsapp/send | Send 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/send | Upload Image (URL) |
| POST | /api/whatsapp/send | Send Media from Local Device |
| POST | /api/whatsapp/send | Upload Document (URL) |
| POST | /api/whatsapp/send | Send Audio via URL |
| POST | /api/whatsapp/send | Send Video via URL |
| POST | /api/whatsapp/send | Send Multiple Media via URLsSends multiple media files in sequence using public URLs. |
| POST | /api/whatsapp/send | Share Location Info |
| POST | /api/whatsapp/send | Send 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/chats | List recent chatsInbox threads for debugging automations. |
| GET | /api/whatsapp/messages | List messages in threadQuery: contact_id (from chats or contacts). |
| POST | /api/whatsapp/assign-chat | Assign chat to agent |
| GET | /api/whatsapp/logs | List message logsPaginated, filterable log of every inbound/outbound message (for a debugging/audit view, not the chat thread UI). |
| GET | /api/whatsapp/logs/billing-summary | Message billing summarySpend and message counts grouped by Meta conversation category (marketing/utility/authentication/service) for a date range. |
| POST | /api/whatsapp/clear-chat | Clear a chatDeletes every stored message with a contact (does not delete the contact) and posts a 'Chat cleared' system message. |
| POST | /api/whatsapp/pin-chat | Pin / unpin a chat |
| GET | /api/whatsapp/contact-profile | Get contact profile panelEverything the chat sidebar shows for a contact: tags, notes, shared media by week, and the assigned agent. |
| POST | /api/whatsapp/conversation-insight | Refresh AI conversation insightForce-regenerates the AI-written conversation summary shown on the contact profile panel. |
| GET | /api/whatsapp/contact-avatar | Get contact avatarRedirects (302) to the contact's profile picture; returns 404 if none is available. |
| GET | /api/chat/all | List 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-tag | Tag a chat's contact |
| DELETE | /api/chat/delete-tag | Remove a tag from a chat's contact |
| POST | /api/chat/add-note | Add a chat note |
| DELETE | /api/chat/delete-note | Delete chat notes |
| POST | /api/chat/assign | Assign a chatAssigns a contact's chat to a human agent or a chatbot (exactly one of agent_id/chatbot_id). |
| POST | /api/chat/unassign | Unassign a chat |
| POST | /api/chat/status | Update 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.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/template/create | Simple TemplateStart here — basic MARKETING template with body and optional footer. |
| POST | /api/template/create | Template with Variables |
| POST | /api/template/create | OTP / Authentication Templatecategory must be AUTHENTICATION — enables OTP-specific fields and buttons. |
| POST | /api/template/create | Template with Quick Reply Buttons |
| POST | /api/template/create | Template with CTA Buttons |
| POST | /api/template/create | Template with Coupon Code |
| POST | /api/template/create | Limited Time Offer Template |
| POST | /api/template/create | Template with Catalog Button |
| POST | /api/template/create | Template with Call Permission |
| POST | /api/template/create | Carousel Template |
| POST | /api/template/create | Template 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-url | Validate template media URL |
| POST | /api/template/sync-status | Sync template approval status |
| GET | /api/templates | List templates |
| GET | /api/templates/meta-list | List templates directly from MetaBypasses the local DB copy — useful to see templates created outside Prepseed before syncing them in. |
| GET | /api/templates/:id | Get one template |
| POST | /api/templates/sync | Sync templates from MetaPulls specific Meta templates (or every pending-review one) into the local template list, mirroring remote header media locally. |
| POST | /api/templates/suggest | AI-suggest a template |
| PUT | /api/templates/:id | Update 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/:id | Delete a template |
| POST | /api/templates/migrate | Migrate a template to another WABABoth WABAs must belong to the same Meta Business Manager. |
| GET | /api/templates/admin-templates/list | Browse 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.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/campaigns | Setup Campaign (All Contacts)Simplest broadcast — sends an approved template to every contact. |
| POST | /api/campaigns | Setup Campaign (Specific Contacts) |
| POST | /api/campaigns | Setup Scheduled Campaign (By Tags) |
| POST | /api/campaigns | Setup Campaign with Media |
| POST | /api/campaigns | Setup Campaign with Dynamic Coupon |
| POST | /api/campaigns | Setup Campaign for Limited Time Offer |
| POST | /api/campaigns | Setup Campaign with Product Carousel |
| POST | /api/campaigns | Setup Campaign with Media Carousel |
| POST | /api/campaigns | Setup Campaign with Media Carousel (Local Files) |
| GET | /api/campaigns | Campaign ListList existing campaigns and statuses before creating a new send. |
| GET | /api/campaigns/:id | Get one campaign |
| PUT | /api/campaigns/:id | Update a campaignOnly draft/scheduled campaigns can be edited freely; a sending/completed campaign only accepts expiration or name/description changes. |
| DELETE | /api/campaigns/:id | Delete a campaignOnly campaigns that haven't started sending can be deleted. |
| POST | /api/campaigns/:id/send | Send a draft campaign |
| GET | /api/campaign-stats/:campaignId/stats | Get campaign statistics |
| GET | /api/campaign-stats/:campaignId/stats/messages | Get campaign stats with per-recipient messages |
| POST | /api/campaign-stats/update-from-message | Recompute campaign stats from a message |
| POST | /api/campaign-stats/bulk-update | Bulk recompute campaign stats |
| PATCH | /api/message-status/:messageId/delivery | Update a message's delivery status |
| PATCH | /api/message-status/:messageId/read | Update a message's read status |
| POST | /api/message-status/whatsapp/status | Update status by WhatsApp message id |
| PATCH | /api/message-status/bulk/delivery | Bulk mark messages delivered |
| PATCH | /api/message-status/bulk/read | Bulk mark messages read |
| GET | /api/message-status/user/:userId/status | Message status summary for a user |
| POST | /api/message-status/status | Look 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).
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/automation | List automation flows |
| GET | /api/automation/node-types | Node types catalogAll valid node types and parameters for flow JSON. |
| POST | /api/automation | Create automation flow |
| PATCH | /api/automation/:flowId/toggle | Toggle flow active |
| POST | /api/automation/:flowId/test | Test flow |
| GET | /api/automation/:flowId/executions | List executions |
| GET | /api/automation/:flowId | Get one automation flow |
| PUT | /api/automation/:flowId | Update an automation flow |
| DELETE | /api/automation/:flowId | Delete an automation flow |
| GET | /api/automation/templates | List built-in flow templatesBlueprint flows (nodes/connections pre-wired) you can instantiate with from-template instead of building from scratch. |
| POST | /api/automation/from-template | Create a flow from a template |
| GET | /api/automation/statistics | Automation statistics |
| GET | /api/automation/executions/:executionId | Get 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.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/chatbots | List chatbots |
| POST | /api/chatbots | Create a chatbot |
| GET | /api/chatbots/:id | Get one chatbot |
| PUT | /api/chatbots/:id | Update a chatbot |
| DELETE | /api/chatbots/:id | Delete a chatbotAlso soft-deletes its knowledge sources and removes their vectors from Qdrant. |
| POST | /api/chatbots/:id/train | Train a chatbotLegacy single-shot trainer: writes one Q&A or text knowledge source and re-queues it for RAG ingestion. |
| POST | /api/chatbots/suggest-actions | Suggest smart actions |
| POST | /api/chatbots/scrape | Scrape a website for knowledgeStreams progress as Server-Sent Events, then a final 'complete' event with the extracted text. |
| POST | /api/chatbots/extract-doc | Extract a document preview |
| GET | /api/chatbots/usage/budget | Chatbot 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/chat | Chat with a bot (test) |
| POST | /api/chatbots/:id/chat/clear | Clear a test chat session |
| POST | /api/chatbots/:id/migrate-rag | Migrate legacy training to RAG sourcesOne-time migration for chatbots trained before knowledge sources existed. |
| GET | /api/chatbots/:id/knowledge-sources | List knowledge sources |
| GET | /api/chatbots/:id/knowledge-sources/:sourceId | Get one knowledge source |
| POST | /api/chatbots/:id/knowledge-sources/text | Add a text knowledge source |
| POST | /api/chatbots/:id/knowledge-sources/qna | Add a Q&A knowledge source |
| POST | /api/chatbots/:id/knowledge-sources/website | Add a website knowledge source |
| POST | /api/chatbots/:id/knowledge-sources/upload-url | Get 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/upload | Add a file knowledge sourceEither upload the file directly, or pass s3_key from the presigned-upload flow. |
| POST | /api/chatbots/:id/knowledge-sources/estimate | Estimate ingest token cost |
| DELETE | /api/chatbots/:id/knowledge-sources/:sourceId | Delete a knowledge source |
| POST | /api/chatbots/:id/knowledge-sources/:sourceId/reindex | Re-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.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/message-bots | Create a keyword trigger |
| GET | /api/message-bots | List keyword triggers |
| GET | /api/message-bots/:id | Get one keyword trigger |
| PUT | /api/message-bots/:id | Update a keyword triggerSame fields as create; only provided fields are changed. |
| DELETE | /api/message-bots/:id | Delete a keyword trigger |
| POST | /api/message-bots/bulk-delete | Bulk 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).
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/quick-replies | List quick repliesIncludes your own replies plus admin-provided ones, unless the user has disabled admin quick replies in settings. |
| GET | /api/quick-replies/admin | List admin quick replies |
| POST | /api/quick-replies | Create a quick reply |
| PUT | /api/quick-replies/:id | Update a quick reply |
| DELETE | /api/quick-replies/delete | Bulk delete quick replies |
| POST | /api/quick-replies/:id/favorite | Toggle 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).
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/reply-materials | Create a reply material |
| GET | /api/reply-materials | List 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-delete | Bulk delete reply materials |
| GET | /api/reply-materials/:id | Get one reply material |
| PUT | /api/reply-materials/:id | Update a reply material |
| DELETE | /api/reply-materials/:id | Delete 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).
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/forms | List forms |
| POST | /api/forms | Create form |
| PATCH | /api/forms/:id/publish | Publish form |
| GET | /api/forms/:id | Get one form |
| PATCH | /api/forms/:id | Update 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/:id | Delete a formDeletes the Meta Flow if it's still a draft, or deprecates it if published. |
| POST | /api/forms/sync | Import Meta Flows |
| POST | /api/forms/sync-status | Sync flow status from MetaRefreshes meta_status, fields, and payload for every form on a WABA from Meta. |
| POST | /api/forms/migrate | Migrate a form to another WABABoth WABAs must belong to the same Meta Business Manager. |
| GET | /api/forms/template | Get 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_id | List raw Meta Flows for a WABADirect Graph API passthrough — every flow on the WABA, imported into Prepseed or not. |
| GET | /api/submissions/:form_id | List a form's submissionsMounted separately at /api/submissions, not under /api/forms. |
| GET | /api/submissions/:id/details | Get one submissionMarks the submission viewed the first time it's fetched. |
| DELETE | /api/submissions/:id | Delete 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).
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/ecommerce-catalog/waba/:waba_id/sync-catalogs | Sync WABA catalogs |
| GET | /api/ecommerce-catalog/catalog/:catalog_id/products | List catalog products |
| POST | /api/ecommerce-webhook/create | Create order webhook |
| POST | /api/ecommerce-webhook/:id/map-template | Map template to webhook |
| POST | /api/whatsapp/send | Send template with dynamic PDF header |
| GET | /api/ecommerce-catalog/waba/:waba_id/catalogs | List catalogs synced for a WABA |
| POST | /api/ecommerce-catalog/link-catalog | Link 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-catalogs | List linked catalogs |
| POST | /api/ecommerce-catalog/catalog/:catalog_id/products | Create a product in a catalog |
| PUT | /api/ecommerce-catalog/catalog/:catalog_id/products/:product_id | Update a productproduct_id is the Meta catalog product id, not the Prepseed document id. |
| DELETE | /api/ecommerce-catalog/catalog/:catalog_id/products/:product_id | Delete a product |
| GET | /api/ecommerce-catalog/user/catalogs | List catalogs across the accountNot scoped to a single WABA. |
| GET | /api/ecommerce-catalog/user/products | List products across the account |
| GET | /api/ecommerce-webhook/list | List order webhooks |
| GET | /api/ecommerce-webhook/:id | Get one webhookThe signing secret itself is never returned — only whether one is set (has_secret) and where it's expected. |
| PUT | /api/ecommerce-webhook/:id | Update a webhook |
| DELETE | /api/ecommerce-webhook/:id | Delete a webhook |
| PATCH | /api/ecommerce-webhook/:id/toggle | Toggle a webhook |
| GET | /api/ecommerce-webhook/:id/stats | Get webhook stats |
| GET | /api/ecommerce-webhook/:id/trigger-logs | Get webhook trigger logs |
| GET | /api/ecommerce-webhook/:id/message-logs | Get 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-notifications | Configure 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.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/waba-configurations/:waba_id | Get WABA configurationFetches (creating a blank one if needed) the auto-reply configuration for a WABA. |
| PUT | /api/waba-configurations/:waba_id | Update 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.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/workspaces/:workspaceId/webhooks | List webhook subscriptionsLists the outbound webhook subscriptions configured for a workspace. |
| POST | /api/workspaces/:workspaceId/webhooks | Create 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/:id | Update webhook subscriptionUpdates a webhook's URL, subscribed events, secret placement or enabled state. |
| DELETE | /api/workspaces/:workspaceId/webhooks/:id | Delete webhook subscriptionRemoves a webhook subscription. |
| POST | /api/workspaces/:workspaceId/webhooks/:id/test | Send 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.