---
title: "Get chat active window status"
description: "Tells you whether the 24-hour customer service window is open for a\ncontact on a given WhatsApp API number. Free-form and interactive\nmessages are only delivered while the window is `active`.\n\nIdentify the contact by `phoneNumber` or `email`. If you send both,\n`phoneNumber` takes precedence.\n"
---

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

Path: Zacx Public API › Chats

`GET /chat/active`

Tells you whether the 24-hour customer service window is open for a
contact on a given WhatsApp API number. Free-form and interactive
messages are only delivered while the window is `active`.

Identify the contact by `phoneNumber` or `email`. If you send both,
`phoneNumber` takes precedence.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Query parameters

- `getChatActiveWindowStatus.query.wabaNumber` (string, required) — Your WhatsApp API number, with country code.
- `getChatActiveWindowStatus.query.phoneNumber` (string, optional) — The contact's phone number, with country code.
- `getChatActiveWindowStatus.query.email` (string, optional) — The contact's email address. Ignored when `phoneNumber` is present.
  - format `email`

## Code samples

### cURL

```curl
curl --request GET \
  --url 'https://api.zacx.io/v1/chat/active?wabaNumber=string' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.zacx.io/v1/chat/active?wabaNumber=string';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.zacx.io/v1/chat/active?wabaNumber=string"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The window state for this contact.

#### Example

```json
{
  "status": "success",
  "data": {
    "status": "active"
  }
}
```

- `getChatActiveWindowStatus.response.200.status` (string, required)
- `getChatActiveWindowStatus.response.200.data` (object, required)
  - `getChatActiveWindowStatus.response.200.data.status` (string, required) — `active` when the contact messaged this number within the last 24 hours.
    - one of `"active"`, `"inactive"`

### 400

One or more parameters are missing or invalid.

#### Example

```json
{
  "status": "error",
  "code": "VALIDATION_FAILED",
  "message": "Parameters are not valid"
}
```

- `getChatActiveWindowStatus.response.400.status` (string, required)
- `getChatActiveWindowStatus.response.400.code` (string, required) — Stable machine-readable error code.
- `getChatActiveWindowStatus.response.400.message` (string, required) — Human-readable explanation.


Source: https://zacx.io/api/chat/active/index.md
