Helo.ai marks years of building enterprise communicationExplore our Journey

Automate bulk messaging for promotions, alerts, and updates - Explore

WhatsApp API Error 131047: The 24-Hour Window Explained

WhatsApp API Error 131047 occurs when you send a free-form message after the 24-hour customer service window has closed. Learn how the window works, why the error occurs, and how to fix and prevent it with the right template strategy.

helo.ai authorSuraj Kori
Aug 17, 20267mins
WhatsApp API Error 131047

Error 131047 is not a bug in your integration. It is WhatsApp enforcing the rule that separates conversation from broadcast, and almost every team meets it the first time they try to follow up on a support thread the next morning.

Meta documents error 131047 as a "Re-engagement message" failure with an HTTP status of 400, and the recommended action is direct: "Send the recipient a template message instead" of a standard message (Meta for Developers, WhatsApp error codes reference, retrieved 2026-08-17).

The fix takes one line of code. What actually reduces the error is understanding when the window is open, what it costs to reopen, and how to design flows that stop hitting the wall. It has direct billing consequences too, because messages inside the window and outside it are priced completely differently. For the full failure surface, our WhatsApp Business API error codes reference indexes the rest.



What Triggers Error 131047?

The error appears when you send a non-template message to a user with no open customer service window. The response:


JSON12 lines
{
  "error": {
    "message": "(#131047) Re-engagement message",
    "type": "OAuthException",
    "code": 131047,
    "error_data": {
      "messaging_product": "whatsapp",
      "details": "Message failed to send because more than 24 hours have passed since the customer last replied to this number."
    },
    "fbtrace_id": "AbCdEfGhIjK"
  }
}


The details field states the rule plainly: more than 24 hours have passed since the customer last replied.

Note what this rules out. Authentication worked, so this is not error 190. The recipient is reachable, so this is not error 131026. You were within your limits, so this is not throttling. The only thing wrong is the type of message you sent for the state the conversation was in.


How the 24-Hour Customer Service Window Works

The customer service window, which Meta abbreviates as CSW, is a rolling permission a user grants by messaging you.


What opens it: a user sending a message to your business phone number. That is the only trigger.


What does not open it: anything you send. A delivered template does not open a window, and neither does a read receipt. A user's tap on a template button generally registers as an inbound message and does open one, which is why interactive templates beat plain text for re-engagement.


What extends it: each new inbound user message resets the 24 hours from that message.


What happens when it closes: free-form messages return 131047. Approved templates continue to work.


Here is the mechanic that catches teams out. A support conversation runs healthily on Monday afternoon and your agent replies at 16:00. The customer's last message was 15:50. At 15:50 on Tuesday the window closes silently, with no webhook announcing it. The agent's follow-up at 16:10 Tuesday fails with 131047, and if they are working a queue they may not notice at all.


Time

Event

Window state

Free-form allowed?

Mon 15:50

Customer messages you

Opens, expires Tue 15:50

Yes

Mon 16:00

You reply (free-form)

Unchanged — your message does not extend it

Yes

Mon 18:30

Customer replies again

Resets, expires Tue 18:30

Yes

Tue 18:31

Window closes

Closed

No

Tue 19:00

You send free-form

Error 131047

Tue 19:05

You send approved template

Yes

Tue 19:10

Customer replies to template

Reopens, expires Wed 19:10

Yes

That last row is the pattern the whole system is built around. A template is not just a compliance formality; it is how you ask permission to have a conversation again.


Session Messages vs Template Messages


Session (free-form) message

Template message

When allowed

Only inside an open 24-hour window

Any time

Pre-approval

None needed

Must be approved by Meta before use

Content

Any text, media, interactive content

Fixed structure with variable placeholders

Cost inside an open window

Free (Meta: "all non-template messages are free")

Utility templates free; marketing always charged

Cost outside the window

Not permitted — returns 131047

Charged per message by category

Typical use

Live support, sales conversations

Notifications, reminders, re-engagement, OTP

The pricing side is worth stating precisely, because it changed. Meta replaced conversation-based pricing with per-message pricing on 1 July 2025 (Meta for Developers, Pricing, retrieved 2026-08-17). Under the current model:

  • All marketing template messages are charged, regardless of window state.
  • Utility templates are free when sent inside an open customer service window and charged when sent outside it.
  • Authentication templates are charged by default, with lower rates available based on messaging volume.
  • All non-template messages are free inside an open window.

The operational implication: keeping a window open is cheaper than reopening one. A utility template sent to a customer who replied two hours ago costs nothing; the same template 25 hours later is billable. Our WhatsApp API pricing guide and the January 2026 pricing update cover current rates by category and market.


Free Entry Points: The 72-Hour Exception

One case gives you a longer, cheaper window, and it is underused. When a user contacts you through Click to WhatsApp Ads or a Facebook Page call-to-action button and you respond within 24 hours, Meta documents that a Free Entry Point window opens. It "remains open for 72 hours," during which a business "can send any type of message to the user at no charge."

Seventy-two hours of any message type at zero cost is a materially different position from the standard window, and it is available to anyone running Click to WhatsApp Ads. For a sales cycle that needs two or three follow-ups, routing acquisition through a free entry point rather than a cold template send changes both conversion mechanics and cost per conversation.


How to Fix and Prevent Error 131047


The immediate fix

Send an approved template instead of a free-form message. Choose the category honestly:


  • Utility — order updates, appointment reminders, account notices, anything transactional the user expects. Free inside an open window, charged outside.


  • Marketing — promotions, re-engagement, product news, anything persuasive. Always charged, and subject to per-user marketing limits.


  • Authentication — one-time passcodes only.


Do not miscategorise a marketing message as utility to save money. Meta reclassifies templates, and the consequences reach beyond one send. See what happens when a template category changes from utility to marketing.


Track window state in your own system

The highest-value change is storing last_inbound_message_at per contact and computing window state before every send. This turns 131047 from a runtime error into a routing decision:


window_open = (now - last_inbound_message_at) < 24 hours

if window_open:
send_free_form(message)
else:
send_template(approved_template, params)

Update last_inbound_message_at from your inbound message webhook, including template button taps. Every agent console and automation should read the same field, so a human and a bot never disagree about what is permitted.


Design templates that reopen the window

A re-engagement template whose only job is to deliver information wastes the opportunity. A template with a quick reply button invites the inbound message that reopens the window, after which the conversation is free-form and free. Our guides to WhatsApp message templates and carousel templates and quick reply buttons cover the mechanics, and template categories covers classification.


Surface the window in your agent console

Agents who cannot see how long a window has left will write free-form replies that fail. A visible countdown on the conversation, plus an automatic switch to a template picker when the window closes, removes the error from human workflow entirely. That is a core function of a shared WhatsApp team inbox.


Prepare templates before you need them

Approval is not instant, and a rejected template at the moment you need to re-engage is an outage. Keep one approved re-engagement template per use case in reserve, and read why WhatsApp templates get rejected before submitting.


Frequently Asked Questions


What is the WhatsApp 24-hour rule?

When a user sends a message to your business, a 24-hour customer service window opens during which you can reply with any message type, including free-form text and media. Each new inbound message resets the 24 hours. Once the window closes, only approved template messages are permitted, and a free-form send returns error 131047.


What can I send after the 24-hour window closes?

Only approved template messages. Choose utility, marketing, or authentication according to what the message actually does. If the template includes a quick reply button and the user taps it, that inbound message reopens the window and returns you to free-form messaging.


Does it cost anything to message inside the window?

Meta documents that all non-template messages are free within an open customer service window, and that utility templates sent inside an open window are also free. Marketing templates are charged in all cases. Outside the window, utility and authentication templates are charged per message under the model that took effect on 1 July 2025.


Do my own outbound messages extend the 24-hour window?

No. Only a user-initiated inbound message opens or resets the window. A business can send templates continuously without ever reopening a free-form window, which is why re-engagement templates with reply buttons matter: they prompt the inbound message that resets the clock.


Why did my message fail with 131047 when the customer replied yesterday?

Because "yesterday" is likely more than 24 hours ago measured from their last message, not from your last reply. The window runs from the customer's most recent inbound message. If they wrote at 15:50 on Monday, it closed at 15:50 on Tuesday regardless of how often your team replied in between.


Is there any way to get a longer window?

Yes, through a free entry point. Meta documents that when a user contacts a business via Click to WhatsApp Ads or a Facebook Page call-to-action button and the business responds within 24 hours, a Free Entry Point window opens for 72 hours, during which any message type can be sent at no charge.


What is the difference between error 131047 and error 131050?

131047 is about timing: the window closed, so send a template. 131050 is about consent. Meta documents it as "user has stopped receipt of marketing messages," with a recommended action of not retrying, because the user opted out. A template fixes 131047; nothing fixes 131050 for that recipient.


Treating the Window as Design, Not an Error


Error 131047 stops being a recurring problem the moment your system knows the window state before it composes a message. Store the last inbound timestamp, branch on it, and the error disappears from your logs, replaced by a template send that was always the correct action.

The deeper opportunity is economic. Meta made messages inside an open window free and messages outside it billable, so conversation design and cost control are now the same exercise. Teams that build reply prompts into their templates and route acquisition through free entry points hold windows open longer, pay less, and get more replies.


Want window state, template routing, and cost visibility handled for you? Helo.ai is a Meta Partner whose platform tracks the customer service window per contact, switches automatically between session and template messages, and shows agents exactly what they can send. Talk to an expert.


Next: read error 131050 and marketing opt-outs for the consent side of re-engagement, or the WhatsApp marketing message limit per user for the frequency caps that sit alongside the window.

About Author
helo.ai author
Suraj Kori

Suraj Kori is associated with Helo.ai and focuses on enterprise communication technologies including WhatsApp Business API, SMS, RCS, and CPaaS solutions. He contributes practical insights on AI-driven messaging, customer engagement, and omnichannel communication strategies for modern businesses.

Related Blogs

WhatsApp API Error 131026
Whatsapp / All

WhatsApp API Error 131026: Why Messages Are Undeliverable

Error 131026 means WhatsApp could not deliver your message. Work through the five root causes and learn which cases are retryable and which are permanent.

helo.ai author
Suraj Kori
Aug 17, 20267mins
whatsapp api error code 0
Whatsapp / All

WhatsApp API Error Code 0: Fix Authentication Failed in 5 Minutes

WhatsApp API error code 0 usually means Meta has rejected your access token. This guide explains the main causes, how to check your token, how to generate a system user token, and how to prevent the error from blocking your WhatsApp messaging again.

helo.ai author
Suraj Kori
Aug 14, 20264mins
Global Fintech Awards
N/A / All

Global Fintech Awards 2026 at GFF: Categories, Nominations & Gala Guide

Explore the Global Fintech Awards 2026, including award categories, nomination process, jury criteria, key deadlines, and Gala Night details at GFF Mumbai.

shriya bajpai
Shriya Bajpai
Aug 12, 20266mins
WhatsApp API Error 131047: 24-Hour Window Explained