> For the complete documentation index, see [llms.txt](https://docs.butlr.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.butlr.io/integrations-api-third-party-sensors/reporting-api/door-window-activity.md).

# Door/Window Activity

How often doors and windows were opened, counted by contact sensors, per room or floor.

| Measurement                  | Data keyed by |
| ---------------------------- | ------------- |
| `room_door_window_activity`  | `room_id`     |
| `floor_door_window_activity` | `floor_id`    |

**Intervals:** `1m`, `15m`, `30m`, `1h`, `1d`. **Max range:** 180 days; see [Query Limits](/integrations-api-third-party-sensors/reporting-api/query-limits.md).

## Fields

| Field        | Description                                               |
| ------------ | --------------------------------------------------------- |
| `open_count` | Number of times a door or window was opened in the window |

Each point also carries [location metadata](/integrations-api-third-party-sensors/reporting-api/items-and-fields.md#location-metadata).

## Example: daily openings per room on a floor

```bash
curl -X POST https://api-integrations.butlr.io/api/v1/reporting \
  -H "Authorization: Bearer [insert access_token here]" \
  -H "Content-Type: application/json" \
  -d '{
    "measurements": ["room_door_window_activity"],
    "items": ["space_XXXX"],
    "start": "2026-09-14",
    "stop": "2026-09-21",
    "timezone": "America/New_York",
    "interval": "1d",
    "fields": ["room_name", "open_count"]
  }'
```

Returns one array per room, keyed by `room_id`, with one point per day.
