> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wavix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp delivery failed

> The message wasn't delivered, and the cause isn't one of the other delivery errors.

**Error code:** `DELIVERY_FAILED`

**Should you try again?** It depends on `subcode`. After you fix the message for the subcodes below, yes. For `CONTENT_BLOCKED`, not with the same content. If `subcode` is `null`, contact support first.

## Why it happens

The `subcode` field gives the cause, and `action` says what to do:

| `subcode` | `action` | Cause |
| - | - | - |
| `TEMPLATE_INVALID` | `fix_and_resend` | The template is invalid or doesn't match its approved version. |
| `MEDIA_UNSUPPORTED` | `fix_and_resend` | WhatsApp doesn't support the media file or its format. |
| `MEDIA_INVALID` | `fix_and_resend` | The media file couldn't be read or uploaded. |
| `CONTENT_BLOCKED` | `fix_and_resend` | WhatsApp blocked the content for a policy violation. |

If `subcode` is `null`, `action` is `contact_support`.

Wavix can add delivery error codes. Treat a code you don't recognize as this error.

## How to fix it

* `TEMPLATE_INVALID`: Check that `name`, `language`, `placeholders`, `header`, and `buttons` in the message match the template returned by [List WhatsApp templates](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-templates.md).
* `MEDIA_UNSUPPORTED`: Send the media in a different file format.
* `MEDIA_INVALID`: Check that the media `url` is a public `https` URL that returns the file and stays reachable until the message is delivered.
* `CONTENT_BLOCKED`: Change the content so that it follows the WhatsApp policies.
* Other subcodes, or `null`: Contact [support@wavix.com](mailto:support@wavix.com). Include the message ID (`uuid`, or `message_uuid` in the event).

After you fix it, send the message again as a new request with a new `idempotency_key`.

## Technical details

| Detail | Value |
| - | - |
| Returned in | The `whatsapp.message.failed` event, in `data.error`, and the `error` field of [Retrieve a WhatsApp message](https://docs.wavix.com/api-reference/whatsapp/retrieve-a-whatsapp-message.md) and [List WhatsApp messages](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-messages.md). The request that sent the message succeeded. |
| `code` | `DELIVERY_FAILED` |
| `subcode` | A value from [Why it happens](#why-it-happens), or `null` |
| `action` | `fix_and_resend` for the subcodes in [Why it happens](#why-it-happens), `contact_support` if `subcode` is `null` |

For the error format and how to handle it, see [WhatsApp delivery errors](https://docs.wavix.com/messaging/whatsapp/troubleshooting.md#how-delivery-errors-reach-you).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.