Route template messages by category
Updated: Sep 21, 2026
Copy for LLM
To help ensure that marketing template messages are always sent to
/marketing_messages, maintain an up-to-date mapping of message templates and their latest category. Follow the template category guidelines and ensure that your content matches the category you select to avoid category changes.A template’s category can change after approval if WhatsApp determines that its content does not match the template category guidelines. For example, a template created as
UTILITY can be updated to MARKETING if its content is promotional. Use the latest category to select the send endpoint:| Latest category | Endpoint |
|---|---|
MARKETING | /<PHONE_NUMBER_ID>/marketing_messages |
All other supported categories | /<PHONE_NUMBER_ID>/messages |
Recommended implementation
- Build the mapping. Store the Messaging account ID, template ID, template name, language or locale, and latest category in persistent storage. Cache the mapping for fast access.
- Add every new template. Create or update its entry when the category is available. Retrieve current categories with the Message Templates API.
- Keep categories current. Subscribe to the template category update webhook. Update the active mapping and cache only after the completed notification, using
new_category. Treat an impending notification as monitoring information; do not route oncorrect_category. - Route every send request. Look up the category by Messaging account ID, template name, and language or locale. Follow the endpoint mapping above for all supported categories. If the mapping is missing, retrieve the category before sending.
- Handle in-flight category changes. After the Messaging account is fully onboarded, set
disable_marketing_messages_on_cloud_apitotrue. Then/messagesrejects marketing templates with error131063; refresh the category and retry through/marketing_messages. If an appeal changes a marketing template to utility,/marketing_messagesrejects it; refresh and retry through/messages. Retry only after a confirmed failure, and make retries idempotent.