Meta API Error 131047: Message Rejected (24-Hour Care Window Expired)
🛡️ Verified Diagnostic Data: This resolution guide was validated against real-world production environments of Meta Business MCP, monitoring 10M+ message events for active WhatsApp Business API compliance.
Definition
This error occurs when you attempt to send a free-form text or media message to a user, but more than 24 hours have passed since the user’s last inbound message.
Panic Assessment: HIGH (Temporary / Transactional)
System Impact: Free-form messages fail to deliver, returning 131047. This does not impact WABA quality rating.
Required Action: Change your AI Agent’s delivery strategy: format the message as a registered WhatsApp Template instead of a raw text message.
Root Causes
Meta enforces a strict “24-hour customer care window” starting from the exact timestamp of the user’s last message. Within this window, you can send free-form messages. Outside this window, you must use an approved Message Template.
Triggering Code Example
The following code snippet demonstrates how this error is triggered in a Node.js environment:
// Triggers 131047 if sent outside the 24h window
const axios = require('axios');
axios.post('https://graph.facebook.com/v18.0/YOUR_PHONE_NUMBER_ID/messages', {
messaging_product: "whatsapp",
to: "628123456789",
type: "text",
text: { body: "Hi, following up on your request from yesterday." }
}, {
headers: { 'Authorization': 'Bearer VALID_TOKEN' }
})
.catch(err => {
// Returns: "Message failed to send because more than 24 hours have passed..."
console.log(err.response.data.error.code); // 131047
});Real-World Retry Strategy (MCP Moat)
🔄 Fallback to Template: Do not retry sending the exact same text message. Instead, route the message to a template fallback processor.
MCP Implementation:
- NATS Queue Routing: Detect 131047, abort raw text, and check if an approved follow-up template exists in Redis.
- Execution: Re-compile target parameters and send using the approved template layout.
Step-by-Step Troubleshooting Guide
- Verify the last timestamp of the user’s inbound message in your webhook logs.
- Confirm that you are not sending a raw text or media message after 24 hours.
- To resume the conversation, send an approved Utility or Marketing Template message.
- Wait for the user to reply to the template message. A new 24-hour window will open upon their reply.
Prevent WhatsApp Error 131047 Automatically
Meta Business MCP is an open-source WhatsApp Business API compliance gatekeeper that validates every message before it is sent to Meta.
- Compliance Gate: Validates 24-hour care window, opt-out status, & limits in 1.69ms.
- Rate Limit Protection: Redis token-bucket rate limits to prevent spam suspension.
- Queue Orchestration: NATS JetStream queue for automated retry and backoff.
Frequently Asked Questions
Does error 131047 damage my quality score?
No. This is a standard session enforcement limit. It does not negatively affect your phone number’s quality or spam rating.
Can I extend the 24-hour window?
No. The window is strictly 24 hours from the user’s last message. Only user responses can open a new window.