Messaging API
Every WhatsApp number, one API
Linked Devices and Meta Cloud API numbers answer the same endpoints, SDK calls and webhook events. Send 20 message kinds, run groups, channels and catalogs, or keep Meta's request format.
- Message kinds in one send call
- 20
- Webhook event types
- 88
- Idempotency-Key window
- 24 h
- API operations
- 231
Two routes
Your code does not pick a side.
The number decides the route. Endpoints, SDK calls and event names stay the same, and anything a route cannot do returns a clear capability error.
- The business keeps its number and WhatsApp app
- Groups, channels, edits, polls and catalogs
- BanSafe Health on every linked number
- Official numbers and approved templates
- Credential and registration checks
- Meta's pricing report per number
- Both connections on one Pro number
- A preferred route per team, project or number
- Pin a single send to either route
What you can send
One send call, 20 message kinds.
Put exactly one kind inside content: text, media and voice notes, polls, locations and contacts, buttons, lists and Flows, products, orders and templates. Some kinds work on one route only.
Groups, channels and commerce
What the app does, through the API.
Run groups and channels, manage the Business App catalog and send Brazil orders with Pix from the same API.
In your code
From key to reply in four steps.
Each step in TypeScript, the CLI or plain REST. Pick what fits your stack.
import { MessagingClient } from "@polymorfa/sdk";
const messaging = new MessagingClient({
credential: { type: "apiKey", value: process.env.POLYMORFA_KEY! },
});
const sent = await messaging.messages.send("my-number", {
conversation: { phoneNumber: "+15550001111" },
content: { image: { url: "https://acme.example/1042.jpg", caption: "Packed and ready" } },
});Receive
Events that wait for you.
Signed webhooks retry for 24 hours. Event streams carry the same events over one connection and resume from your last cursor.
Bring your code
Keep the code you already run.
Point Meta Cloud API code at the Graph API base URL, or connect an existing Baileys client to the Raw WhatsApp Bridge.
API surface
The parts you call most.
A selection of the Messaging API. The reference lists every endpoint with its scope, request and response.
Messages and routing
- POST
/Send any message kindmessaging/ {number}/ messages/ send - POST
/React to a messagemessaging/ {number}/ messages/ react - PUT
/Edit a sent messagemessaging/ {number}/ chats/ {chat}/ messages/ {id} - POST
/Mark messages as seenmessaging/ {number}/ messages/ seen - GET
/Check numbers are on WhatsAppmessaging/ {number}/ contacts/ check - PUT
/Set a Hybrid Link routing policymessaging/ routing/ hybrid
Groups, channels and commerce
- POST
/Create a groupmessaging/ {number}/ groups - POST
/Add group membersmessaging/ {number}/ groups/ {id}/ participants/ add - POST
/Create a group on an official numbermessaging/ {number}/ official-groups - POST
/Create a channelmessaging/ {number}/ channels - POST
/Add a catalog productmessaging/ {number}/ business/ products - POST
/Read an order's detailsmessaging/ {number}/ business/ orders/ {orderId}/ lookup
Webhook events
- Event
message.receivedSomeone wrote to the number - Event
message.ackDelivered and read receipts - Event
message.voteSomeone voted in a poll - Event
group.participantMembers joined, left or changed role - Event
order.payment_updatedWhatsApp reported a payment update - Event
session.statusThe number connected or disconnected
Streams, history and bridges
- GET
/Stream events over SSEplatform/ projects/ {projectId}/ events/ stream - GET
/Read event historyplatform/ projects/ {projectId}/ events - POST
/Replay an event to a webhookplatform/ projects/ {projectId}/ events/ {eventId}/ replays - POST
/Send in Meta's formatgraph/ whatsapp/ v26.0/ {phoneNumberId}/ messages - GET
/Resolve the Bridge endpointmessaging/ bridge/ route
Start with a free number
Your first real number is free. Add more numbers on Pay-As-You-Go.