WhatsApp error 131047: more than 24 hours since the recipient last replied

A free-form WhatsApp message only lands inside the customer service window, which the customer opens by writing to you. Outside it, Meta accepts approved templates and nothing else.

Start free →

Made with Hermoso

Error 131047 is the first wall most WhatsApp integrations hit after setup. A plain text reply that worked yesterday fails today, and nothing in the account has changed.

The exact error

Meta's WhatsApp error code reference lists 131047 with the details "More than 24 hours have passed since the recipient last replied to the sender number." and the solution "Send the recipient a template message instead." In Cloud API's error format it looks like this:

{
  "error": {
    "code": 131047,
    "error_data": {
      "messaging_product": "whatsapp",
      "details": "More than 24 hours have passed since the recipient last replied to the sender number."
    }
  }
}

Meta also reports errors on the messages webhook, under entry.changes.value.errors and entry.changes.value.messages.errors. Meta advises building error handling around code and details: error_subcode is deprecated and not returned from v16.0.

What it means

WhatsApp has two kinds of outbound message. Free-form messages (text, media, buttons, lists) are customer service messages. They are allowed only inside a 24-hour customer service window. Templates are pre-approved messages and can be sent at any time to people who opted in. Error 131047 means you sent a free-form message and the window was closed.

Why it happens

The window opens only when the customer messages your business, and it runs for 24 hours from their last message. Your own messages do not extend it. Typical causes:

  • Replying to a ticket the next day with plain text.
  • Starting a conversation with plain text instead of a template.
  • A follow-up job that sends free-form text on a schedule.
  • Broadcasting free-form text to a list. Each person has their own window, and most are closed.

Pricing follows the same split. Since 1 July 2025 Meta charges per delivered template message. Non-template messages are free, and they can only be sent inside an open window. Utility and authentication templates are free inside an open window too.

How to fix it

  1. Find the time of the customer's last inbound message. If it is older than 24 hours, the window is closed.
  2. Send an approved template instead. For a transactional follow-up, a utility template fits. Check its status first with GET /{waba-id}/message_templates.
  3. Once the customer replies, the window reopens for 24 hours and free-form messages work again.
  4. Do not retry the same free-form message. It fails until the customer writes.
  5. For bulk sends, use templates only. A free-form broadcast is a separate bet on each person's window.

How Hermoso handles it

Hermoso sends WhatsApp templates and replies from your own numbers (see WhatsApp on Hermoso). It receives Meta's message webhooks and keeps the last 48 hours of each conversation, so it can read the window. A free-form message to someone whose window Hermoso knows has closed is refused before anything reaches their phone, with the reason. When Hermoso cannot tell, because nobody has written or the history could not be read, the message is sent as asked and Meta judges it. If Meta answers 131047, Hermoso says the window is closed, that reconnecting cannot change it, and that an approved template is the way to reach that person.

Broadcasts are templates only. Every send is confirmed with you first, because it reaches a real phone and Meta bills the business. Meta accepting a message is never reported as delivered: delivery is read from Meta's status webhooks.

Related

Every platform error we have documented is on the error reference. For app reviews and access levels, see how to get API access.

Sources

Frequently asked questions

How long is the WhatsApp customer service window?

24 hours from the customer's last message to your business. Your own messages do not extend it.

Can I send any message after the window closes?

Only an approved template, sent to someone who opted in. Free-form text, media and interactive messages fail with 131047.

Does retrying fix error 131047?

No. The message keeps failing until the customer writes to you again, which reopens the window.

Do messages inside the window cost money?

Non-template messages are free, and utility and authentication templates are free inside an open window, per Meta's pricing since 1 July 2025.

Skip the error hunting: connect your accounts to Hermoso free, no card.

Start free →   See pricing