# whatsapp_window_closed

> The whatsapp_window_closed Problem Details code: WhatsApp only allows free-form messages within 24 hours of the customer’s last message.

Source: https://docs.nexafone.so/v1/errors/whatsapp_window_closed/

| | |
| --- | --- |
| HTTP status | `422` |
| Area | Messaging and templates |
| Problem `type` | `https://docs.nexafone.so/errors/whatsapp_window_closed` |

WhatsApp only allows free-form messages within 24 hours of the customer’s last message. Send an approved template instead.

## What the `detail` says

The `detail` explains the occurrence; it can read, for example:

- More than 24 hours have passed since the customer last wrote. Only an approved template can be sent until they write again.

## Handling it

The request is well-formed but its values are not accepted; fix them before retrying.

## Example

```json
{
  "type": "https://docs.nexafone.so/errors/whatsapp_window_closed",
  "title": "Unprocessable Entity",
  "status": 422,
  "code": "whatsapp_window_closed",
  "detail": "More than 24 hours have passed since the customer last wrote. Only an approved template can be sent until they write again.",
  "requestId": "01J9Z8Q4TQ3W6M5V2X7Y8Z9A0B"
}
```

Match on `code`, never on `detail`: the wording may change. See [Problem Details](/v1/errors/).
