# The window-closing event: answer before WhatsApp's 24 hours run out

> conversation.window_closing tells your system before a contact's 24-hour WhatsApp window closes, so a reply goes out as free text instead of a paid template.

WhatsApp lets a business answer with free text for 24 hours after the contact's last message. After that, only an approved template can be sent. `conversation.window_closing` warns your webhooks before that happens, so someone can still answer in time.

```json
{
  "type": "conversation.window_closing",
  "data": {
    "contact": "61412345678",
    "name": "Sample Contact",
    "window_closes_at": "2026-11-23T10:15:00.000Z",
    "reply_by": "2026-11-23T10:00:00.000Z",
    "minutes_left": 45,
    "last_inbound_at": "2026-11-22T10:15:00.000Z",
    "unanswered": true,
    "conversation_url": "https://www.app2email.com/conversation/...",
    "contact_url": "https://www.app2email.com/c/..."
  }
}
```

- `window_closes_at` is 24 hours after the contact's last message: when WhatsApp closes the window.
- `reply_by` is 15 minutes earlier. app2email stops sending free text then, to be safe; it is also the API's own `window_closes_at`. `minutes_left` counts to it.
- If the conversation came through a [reference link](/guides/reference-links), the event also has `reference`.

It is sent once per window, to every webhook of the number. A new message from the contact opens a new window, and with it a new event.

<a id="settings"></a>

## Settings

In the [link settings](/guides/link-settings#settings) (dashboard: **Integrations → Link utilities**, or `PUT /v1/{number}/links/settings`):

| Setting | Default | What it does |
| --- | --- | --- |
| `window_event_lead_minutes` | `60` | How many minutes before the window closes: 15 to 720, or 0 to switch the event off. |
| `window_event_only_unanswered` | `true` | Only when the contact's message is the last one (nobody answered yet). |

Numbers linked by QR code (personal WhatsApp numbers) have no window, so they never get this event.
