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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On message status changed

> Start an automation when a WhatsApp message status changes.

`onWhatsAppMessageStatusChanged` receives `sent`, `delivered`, `read`, `failed`, and `played` updates for the connected WhatsApp Business phone number.

```ts automations/watch-whatsapp-delivery.automation.ts theme={null}
import { automation } from "automate.ax"
import { onWhatsAppMessageStatusChanged } from "automate.ax/whatsapp"

export default automation("Watch WhatsApp delivery", () => {
  const status = onWhatsAppMessageStatusChanged()

  status.messageId
  status.status
  status.errors
})
```

It accepts optional static `account`. The signal includes message and recipient IDs, status, timestamp, callback data, conversation origin and expiry, pricing classification, structured Meta errors, and `providerEvent`.

Status updates are deduplicated by message ID, status, and provider timestamp. A `sent` response is not proof of delivery; use `delivered`, `read`, or `failed` for downstream handling.
