# Get day × hour heatmap

Fetches a day × hour heatmap.

```http
GET https://api.pozy.ai/v1/analytics/inbox/heatmap
```

- Area: Analytics / Inbox Analytics
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `fromDate` (string (date), required)
- `toDate` (string (date))
- `profileId` (string)
- `platform` (string)
- `accountId` (string)
- `source` (string)
- `action` (string): one of message.received, message.sent, message.read, all

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/analytics/inbox/heatmap?fromDate=2026-10-01" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/analytics/inbox/heatmap?fromDate=2026-10-01", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/analytics/inbox/heatmap",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "fromDate": "2026-10-01",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `from`, string (date)
- `to`, string (date): Can be null
- `buckets`, array of object
  - `dow`, integer: 1 to 7
  - `hour`, integer: 0 to 23
  - `received`, integer
  - `sent`, integer
  - `read`, integer

```json
{
  "success": true,
  "from": "2026-10-01",
  "to": "2026-10-01",
  "buckets": [
    {
      "dow": 1,
      "hour": 1,
      "received": 1,
      "sent": 1,
      "read": 1
    }
  ]
}
```
