Marketing Messages API for WhatsApp: Developer Guide (2027)
How the Marketing Messages API for WhatsApp differs from Cloud API, handling error 131063, the 2027 cutover dates, and a test plan with curl and Node examples.
Nikhil maintains the notifications service at a Bengaluru lending app. It sends about forty thousand WhatsApp templates a day through Meta’s Cloud API: EMI reminders, KYC nudges, a monthly offer to customers who opted in. On a Tuesday in November 2026 a product manager forwarded him Meta’s notice about the WhatsApp Cloud API marketing sunset with one line: “does this break us?” Nikhil’s honest answer was that he did not know which of his templates Meta counted as marketing, which endpoint they should go through, or what the error would look like when the old one stopped. This guide is the answer he built over the following two days.
It covers what the Marketing Messages API for WhatsApp is, how it differs from the Cloud API /messages endpoint you already call, the two dates that matter in 2027, the account flag that lets you rehearse the cut-off, how to handle error 131063, how to catch templates Meta reclassifies, and a test plan. If you send through a platform such as the StartMessaging WhatsApp API, the last section shows what changes for you and what does not. The business-level view, including who has to do what, is in the companion post on the Cloud API marketing sunset.
What the Marketing Messages API Is
The Marketing Messages API for WhatsApp is Meta’s endpoint for business-initiated marketing templates. It began as a limited release called “MM Lite”, reached general availability on 19 November 2025, and from 13 October 2027 it becomes the only way to send marketing messages, because the Cloud API stops accepting them on that date. Meta’s overview is at developers.facebook.com and is the reference for everything that follows.
Three things stay the same between the two endpoints. The WhatsApp Business Account, phone number and access token are the same. The template object in the request body is the same: name, language, components, parameters. Billing is the same per-message model at the same market rate; Meta states the billing model does not change.
Three things differ. The path is different. The new endpoint accepts delivery controls the Cloud API never had: a time-to-live after which an undelivered message is dropped, delivery optimisation that lets Meta pick the send moment within that window, and marketing creative such as GIFs. And the new endpoint carries the max-price mechanism, in open beta since 1 October 2026, which lets you cap the per-message price you are willing to pay. Delivery optimisation is not offered in every market; Meta’s exclusion list includes the EEA, the UK, Japan, South Korea, Nigeria, South Africa and Thailand. India is not excluded.
The Two Dates That Decide Your Timeline
| Date | Rule | Practical meaning |
|---|---|---|
| 13 April 2027 | Messaging accounts created on or after this date cannot send marketing templates through the Cloud API | Any new number or new WABA you onboard from May 2027 must use the new endpoint from day one |
| 13 October 2027 | The Cloud API stops supporting marketing messages for every account | Existing integrations must have moved by then or marketing sends fail with error 131063 |
Utility, authentication and service messages are unaffected on both dates. If Nikhil’s EMI reminder is an approved utility template, it stays on /messages. If Meta has reclassified it as marketing, it does not. That is the catch the rest of this guide is about.
Cloud API vs Marketing Messages API: the Request Side by Side
Here is a marketing template send the way most Indian backends do it today, against the Cloud API. Replace the version, phone number ID and token with your own.
curl -X POST "https://graph.facebook.com/v22.0/PHONE_NUMBER_ID/messages" \
-H "Authorization: Bearer META_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "template",
"template": {
"name": "diwali_offer_2027",
"language": { "code": "en" },
"components": [
{ "type": "body", "parameters": [ { "type": "text", "text": "Nikhil" } ] }
]
}
}'
The same send on the Marketing Messages API changes the path and nothing in the template object. Meta’s documentation names the endpoint as the phone number’s marketing_messages edge; confirm the exact path and any optional delivery fields against the overview linked above, because Meta revises field names between Graph API versions.
curl -X POST "https://graph.facebook.com/v22.0/PHONE_NUMBER_ID/marketing_messages" \
-H "Authorization: Bearer META_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "template",
"template": {
"name": "diwali_offer_2027",
"language": { "code": "en" },
"components": [
{ "type": "body", "parameters": [ { "type": "text", "text": "Nikhil" } ] }
]
}
}'
The response shape is the same on success: a messages array with a message ID you can match against the delivery webhook. That is the key design decision for the migration: route by template category, keep the payload builder shared.
In Node, the cleanest shape is a single send function that picks the path from the template’s category and leaves everything else untouched.
// send-template.js (Node 20+, native fetch)
const GRAPH = 'https://graph.facebook.com/v22.0';
const PHONE_NUMBER_ID = process.env.META_PHONE_NUMBER_ID;
const TOKEN = process.env.META_ACCESS_TOKEN;
// Category comes from your template cache, refreshed from Meta's template
// status and category webhooks (see below). Never hardcode it.
function endpointFor(category) {
return category === 'MARKETING' ? 'marketing_messages' : 'messages';
}
export async function sendTemplate({ to, name, language, components, category }) {
const res = await fetch(`${GRAPH}/${PHONE_NUMBER_ID}/${endpointFor(category)}`, {
method: 'POST',
headers: { Authorization: `Bearer ${TOKEN}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
messaging_product: 'whatsapp',
to,
type: 'template',
template: { name, language: { code: language }, components },
}),
});
const data = await res.json();
if (!res.ok) {
const code = data?.error?.code;
if (code === 131063) {
// Marketing template sent through the Cloud API after the cut-off or on a
// flagged account. Do not retry: fix the route for this template.
throw new Error(`ROUTE_BUG: template ${name} must use marketing_messages`);
}
throw new Error(`META_${code ?? res.status}: ${data?.error?.message ?? 'unknown'}`);
}
return data.messages[0].id;
}
The important line is the one that refuses to retry on 131063. A retry loop that treats every non-200 as transient will hammer a refused send until a human reads the logs.
Error 131063 and the disable_marketing_messages_on_cloud_api Flag
Error 131063 is Meta’s signal that a marketing message was sent to the Cloud API from an account that may no longer do that. Two conditions produce it: the date is past 13 October 2027, or the Messaging account has the flag disable_marketing_messages_on_cloud_api set.
The flag is your rehearsal switch. It is set at the Messaging account level, and once it is on, every marketing template sent through /messages on that account fails with 131063 while the same template through marketing_messages succeeds. Set it on a staging number as soon as your routing change is deployed. If any marketing send on staging returns 131063, you have found a template whose category your code got wrong, or a code path that bypasses the shared send function. Leave the flag on in staging permanently; it costs nothing and turns the October 2027 cut-off into a condition you have already been running under for months.
Treat the error as a bug, not an outage. Log it at error level with the template name, mark the template for review, and do not re-queue. The customer never sees a half-delivered state because the message was never accepted.
Catching Templates Meta Reclassifies
The silent failure mode in this migration is reclassification. Meta reviews template content against its category rules, and a template submitted as utility can be moved to marketing at approval time or later, when its classifier decides the body promotes rather than informs. After 13 October 2027, a reclassified template is a marketing message and must go through the new endpoint. If your routing table still says utility, the send fails with 131063 on a template you believed was safe.
Three ways to stay current, and you should use all three:
- Subscribe to the template webhooks on the WhatsApp Business Account. Meta sends a template status update when a template is approved, rejected, paused or disabled, and a separate category update when it moves a template between categories. Write both into the template cache your send function reads from. Never cache a category at deploy time and forget it.
- Re-pull the template list on a schedule. Once a day, fetch the account’s templates from Meta and diff the categories against your cache. The webhook is the fast path; the daily pull catches anything a webhook outage lost.
- Write utility templates that stay utility. The template approval tips post lists what tips a template into marketing: offers, urgency, promotional language, anything not tied to a specific transaction. Nikhil’s monthly offer was always marketing; his “EMI due in 3 days, pay to avoid charges” is utility, and it stays utility only as long as nobody adds “plus get 2% cashback” to the body.
Platforms expose the same information. StartMessaging’s templates page shows the current category on every template and a notice when Meta changes it; if you consume templates through the platform rather than from Meta directly, that notice is the trigger to check your routing.
Test Plan Before the Cut-off
Run this on a staging WhatsApp Business Account with a real phone number and the flag set. Each step has a pass condition.
| Step | Action | Pass when |
|---|---|---|
| 1 | Deploy the category-based routing to staging | Build passes, send function has one entry point |
| 2 | Set disable_marketing_messages_on_cloud_api on the staging Messaging account | Meta confirms the flag |
| 3 | Send every marketing template once through the shared function | Every send returns a message ID; zero 131063 |
| 4 | Force one marketing template through /messages deliberately | 131063 is returned and logged as ROUTE_BUG, not retried |
| 5 | Send every utility and authentication template | All succeed on /messages |
| 6 | Change a staging template’s category in your cache to MARKETING and resend | It routes to marketing_messages without a code change |
| 7 | Simulate a category update webhook | Cache updates; next send routes correctly |
| 8 | Check delivery webhooks for the new endpoint | sent, delivered, read statuses arrive with the same message IDs |
| 9 | Review per-user limits | Marketing sends to a test user hit the same limit behaviour; see the messaging limits guide |
| 10 | Run one real campaign in September 2027 through the new path | Delivery rate matches the previous campaign within normal variance |
Step 4 is the one teams skip. Proving the error path works is as important as proving the success path, because 131063 is what production will throw at you if anything is missed.
If You Send Through the StartMessaging API
If your backend sends WhatsApp messages through StartMessaging rather than calling Meta directly, the request you make is not expected to change. You call the documented messages endpoint with your bearer token and the template object, and the platform sends it through Meta on your behalf using your own WhatsApp Business Account. If anything in that contract has to move, it will be published in the API reference well before the 13 April 2027 cut-off.
curl -X POST "https://waba-api.startmessaging.com/api/v1/messages" \
-H "Authorization: Bearer sm_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7c1e4b9a-diwali-60012" \
-d '{
"to": "919876543210",
"type": "template",
"template": {
"name": "diwali_offer_2027",
"language": "en",
"components": [
{ "type": "body", "parameters": [ { "type": "text", "text": "Nikhil" } ] }
]
}
}'
The platform-side change between the Cloud API and the Marketing Messages API is scheduled on the platform side ahead of the 13 April 2027 cut-off. What stays with you is the same list as for a direct integration minus the endpoint: keep template categories current (the templates page and the template webhooks show them), keep opt-ins clean, and keep any direct Meta calls you make outside the platform on the migration plan above. The API reference and the webhooks guide document the request shape, the error envelope and the delivery events; the error-and-limits page lists how Meta errors, including a refused marketing send, are surfaced to you.
Frequently Asked Questions
Q: Do I need a new access token or a new WhatsApp Business Account for the Marketing Messages API?
A: No. The Marketing Messages API uses the same WhatsApp Business Account, phone number ID and access token as the Cloud API. It is a different endpoint on the same Graph API, not a different product. Templates do not need to be resubmitted either.
Q: Which messages have to move and which can stay on the Cloud API?
A: Only marketing templates move. Utility templates, authentication templates and free-form service messages inside the 24-hour window stay on the Cloud API. The trap is reclassification: a utility template that Meta moves to the marketing category must go through the Marketing Messages API from that moment on.
Q: What does error 131063 mean and should I retry it?
A: It means a marketing template was sent through the Cloud API from an account that no longer accepts that, either after 13 October 2027 or because disable_marketing_messages_on_cloud_api is set. Do not retry. Log it, mark the template for review, and fix the route; the send was refused, not delayed.
Q: Will the Marketing Messages API change what I pay per message?
A: Meta states the billing model is the same per-message rate as the Cloud API. The new endpoint adds max-price bidding, in open beta since 1 October 2026, which lets you cap the price per message; several vendors report it becomes generally available and required in eligible markets in the second quarter of 2027, which Meta has not dated.
Nikhil’s answer to the product manager, two days later, was one Slack message: routing is by category, staging runs with the flag on, 131063 is a logged bug and not a retry, and the EMI reminder stays utility as long as nobody adds a cashback line. If you send through a platform, your version of that message is shorter still, and if you want one where you own the WhatsApp Business Account and pay Meta directly on top of a flat subscription, connect a number to StartMessaging, open the templates page, and read the category column before October 2027 reads it for you.
StartMessaging Team
StartMessaging Team