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

# WhatsApp Flow Webhook Examples

> Handle WhatsApp Flow status change events.

<Note>For the exhaustive schema-derived catalog, see [all examples](/en/api-reference/guides/examples/webhook-examples/webhook-payload-examples).</Note>

## What it is

Handle WhatsApp Flow status change events.

## Before you begin

* Create a public HTTPS endpoint in your application.
* Configure a YCloud webhook endpoint for the event types you need.
* Store the endpoint signing secret securely.
* Make event processing idempotent.

## How it works

YCloud sends an HTTP `POST` request when the event occurs. Verify the signature, durably record the event, return a `2xx` response, and process slow work asynchronously.

## Request

The scenarios below show requests delivered to your webhook URL. Treat the event `id` as the delivery identifier and use `type` to route the payload.

## Response

Return a `2xx` status after accepting the event.

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

<Note>For endpoint setup, signature validation, and retry behavior, see [Configure webhooks](/en/api-reference/guides/api-fundamentals/configure-webhooks).</Note>

## Flow Status Change

When a WhatsApp Flow changes its status (e.g., from DRAFT to PUBLISHED), you will receive a webhook with the following payload structure:

### Request

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "type": "whatsapp.flow.status_change",
  "id": "evt_1234567890abcdef",
  "apiVersion": "v2",
  "createTime": "2025-09-11T07:24:52.000Z",
  "flowChanges": {
    "flowId": "1097420589034000",
    "wabaId": "123456789012345",
    "message": "Flow Webhook 3 changed status from DRAFT to PUBLISHED",
    "oldStatus": "DRAFT",
    "newStatus": "PUBLISHED"
  }
}
```

### Response

Acknowledge the delivery after durably accepting the event.

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

### Explanation

* **type**: Always `whatsapp.flow.status_change` for flow status change events
* **flowChanges**: Contains the flow status change details
  * **flowId**: The unique ID of the Flow that changed status
  * **wabaId**: WhatsApp Business Account ID associated with the flow
  * **message**: Human-readable description of the status change
  * **oldStatus**: The previous status of the flow
  * **newStatus**: The current status of the flow

### Common Flow Status Values

* `DRAFT`
* `PUBLISHED`
* `DEPRECATED`
* `BLOCKED`
* `THROTTLED`


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