# flow.status_changed

HTML: https://www.app2email.com/docs/api/webhooks/flow.status_changed · Index: https://www.app2email.com/docs/api/llms.txt

A flow was published, throttled, blocked or deprecated, Meta raised or cleared an endpoint or client alert, or its Flow JSON version expires soon. WABA-wide: every number gets it.

Group: Flows. Header `X-App2email-Event: flow.status_changed`. Inside the envelope `{id, type, created, number, test?, data}` ([envelope, headers, signature](https://www.app2email.com/docs/api/webhooks.md)). Every webhook of the number gets every number event: filter by `type`.

## data

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `data.flow_id` | string | yes |  |
| `data.change` | string | yes | status (FLOW_STATUS_CHANGE); else Meta's event in lower case: client_error_rate, endpoint_error_rate, endpoint_latency, endpoint_availability, flow_version_expiry_warning (and any event Meta adds); other when Meta sent no event. |
| `data.event` | string |  | Meta's event: FLOW_STATUS_CHANGE, CLIENT_ERROR_RATE, ENDPOINT_ERROR_RATE, ENDPOINT_LATENCY, ENDPOINT_AVAILABILITY, FLOW_VERSION_EXPIRY_WARNING. |
| `data.old_status` | string |  | Left out when the flow was just created.; one of: `DRAFT`, `PUBLISHED`, `DEPRECATED`, `BLOCKED`, `THROTTLED` |
| `data.new_status` | string |  | one of: `DRAFT`, `PUBLISHED`, `DEPRECATED`, `BLOCKED`, `THROTTLED` |
| `data.message` | string |  | Meta's text. |
| `data.warning` | string |  | FLOW_VERSION_EXPIRY_WARNING: the Flow JSON version will freeze soon. |
| `data.alert_state` | string |  | one of: `ACTIVATED`, `DEACTIVATED` |
| `data.threshold` | number |  |  |
| `data.error_rate` | number |  |  |
| `data.p50_latency` | integer |  |  |
| `data.p90_latency` | integer |  |  |
| `data.availability` | number |  |  |
| `data.requests_count` | integer |  |  |
| `data.errors` | object[] |  |  |
| `data.errors.error_type` | string |  |  |
| `data.errors.error_rate` | number |  |  |
| `data.errors.error_count` | integer |  |  |
| `data.timestamp` | string |  |  |

## Samples

### published

```json
{
  "id": "evt_Xq3k9m2Lw8Rt5Yp1Zs21",
  "type": "flow.status_changed",
  "created": "2026-11-06T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "flow_id": "1234567890123456",
    "change": "status",
    "event": "FLOW_STATUS_CHANGE",
    "old_status": "DRAFT",
    "new_status": "PUBLISHED",
    "message": "Flow appointment_booking changed status from DRAFT to PUBLISHED",
    "timestamp": "2026-11-06T01:00:00.000Z"
  }
}
```

### endpoint latency

```json
{
  "id": "evt_Xq3k9m2Lw8Rt5Yp1Zs22",
  "type": "flow.status_changed",
  "created": "2026-11-06T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "flow_id": "1234567890123456",
    "change": "endpoint_latency",
    "event": "ENDPOINT_LATENCY",
    "alert_state": "ACTIVATED",
    "message": "Flow endpoint latency has reached the p90 threshold in the last 30 minutes.",
    "p90_latency": 8000,
    "p50_latency": 500,
    "requests_count": 34,
    "threshold": 7000,
    "timestamp": "2026-11-06T01:00:00.000Z"
  }
}
```

### version expiry

```json
{
  "id": "evt_Xq3k9m2Lw8Rt5Yp1Zs23",
  "type": "flow.status_changed",
  "created": "2026-11-06T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "flow_id": "1234567890123456",
    "change": "flow_version_expiry_warning",
    "event": "FLOW_VERSION_EXPIRY_WARNING",
    "warning": "Your current Flow version will freeze in 21 days. You won't be able to send the Flow after it expires. Please migrate to the recommended version as soon as possible.",
    "timestamp": "2026-11-06T01:00:00.000Z"
  }
}
```

## Caused by

- [Create a flow (draft, or published at once)](https://www.app2email.com/docs/api/flows/create-flow.md): `POST /v1/{number}/flows`
- [Publish a flow (cannot be undone)](https://www.app2email.com/docs/api/flows/publish-flow.md): `POST /v1/{number}/flows/{id}/publish`
- [Deprecate a published flow (cannot be undone)](https://www.app2email.com/docs/api/flows/deprecate-flow.md): `POST /v1/{number}/flows/{id}/deprecate`

Send it to your URL: https://www.app2email.com/docs/api/webhooks/tester?type=flow.status_changed
