---
title: "Get device summary for a geofence"
method: GET
path: "/geofence/v1/geofences/{geofence_id}/device-summary"
tags: ["geofence_Device State"]
---

# Get device summary for a geofence

`GET /geofence/v1/geofences/{geofence_id}/device-summary`

Returns aggregate statistics about devices in relation to a specific geofence (total devices, inside count, outside count)

## Path parameters

- `geofence_id` string, uuid, required

## Headers

- `X-Esper-Tenant-Id` string, uuid, required
- `X-Caller-Id` string, required

## Response `200`

Device summary retrieved successfully

- object
  - `content` GeofenceDeviceSummaryResponse — Summary statistics of devices in relation to a geofence
    - `total_devices` integer, required — Total number of devices associated with the geofence
    - `inside_count` integer, required — Number of devices currently inside the geofence
    - `outside_count` integer, required — Number of devices currently outside the geofence
    - `unknown_count` integer, required — Number of devices with unknown state (neither inside nor outside)

## Other responses

- `400` — Invalid geofence ID or missing tenant ID
- `401` — Unauthorized
- `500` — Server error

---

[API](https://skmtc.net/esper/apis/esper-api-reference.md) · [All operations](https://skmtc.net/esper/apis/esper-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esper/esper-api-reference/versions/e1f64cbb488e/schema)
