View Categories

WhatsApp Message Failure Due to Invalid Footer Placement in API Payload

1 min read

Table of Contents

#

Problem Statement

WhatsApp messages are failing with the error Invalid enum value… received 'footer' while sending template messages via API.


Error Observed

WAClientException.SendMessageFailed: AxiosError. Request failed with status code 400
Validation error: Invalid enum value.
Expected 'header' | 'HEADER' | 'body' | 'BODY' | 'carousel' | 'CAROUSEL' |
'button' | 'BUTTON' | 'limited_time_offer' | 'LIMITED_TIME_OFFER',
received 'footer' at "template.components[2].type"

RCA (Root Cause Analysis)

The error occurs because footer is incorrectly added as a component type inside the components array of the WhatsApp template payload.

The WhatsApp API does not support footer as a valid component type within the components array.


Expected System Behavior

The only allowed component types inside the components array are:

  • HEADER

  • BODY

  • BUTTON

  • CAROUSEL (if enabled)

  • LIMITED_TIME_OFFER (if enabled)

Any unsupported value (such as footer) will result in a validation error.


Incorrect Payload Example

"components": [
{
"type": "HEADER", ... },
{
"type": "BODY", ... },
{
"type": "footer", "text": "Your footer text" } // <-- This is the issue 
]

Solution / Recommendation

  • Do not include footer inside the components array.

  • Keep only valid component types (HEADER, BODY, etc.) inside components.

  • The footer must be added outside the components array in the supported structure.


Correct Footer Structure Example

{
    "type": "footer",
    "parameters": [
        {
            "type": "text",
            "text": "Call Now"
        }
    ]
}

Next Steps

Request the WhatsApp service provider to correct the payload structure by removing footer from the components array and placing it in the supported format.

Scroll to Top