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

# Get devices for a geofence

`GET /geofence/v1/geofences/{geofence_id}/devices`

Returns a paginated list of devices and their states within a specific geofence. Supports filtering by inside/outside status and blueprint version ID.

## Path parameters

- `geofence_id` string, uuid, required

## Query parameters

- `offset` integer
- `limit` integer
- `inside` boolean
- `blueprint_id` string, uuid
- `blueprint_version_number` integer

## Headers

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

## Response `200`

Device list retrieved successfully

- object
  - `content` object
    - `next` string, nullable
    - `previous` string, nullable
    - `results` GeofenceDeviceListingItem[]
      - `device_id` string, uuid, required — UUID of the device
      - `blueprint_id` string, uuid, required — UUID of the blueprint used by this device
      - `blueprint_version_number` integer, required — Blueprint version number used by this device
      - `inside` boolean, nullable — Whether the device is currently inside the geofence. Null means unknown state.
      - `state_changed_at` string, date-time, nullable — When the device's geofence state was last changed. Null means unknown time.
      - `latitude` number, double, nullable — Last known latitude for the device, rounded to 4 decimal places.
      - `longitude` number, double, nullable — Last known longitude for the device, rounded to 4 decimal places.
      - `location_updated_at` string, date-time, nullable — Timestamp when the device location was last updated.

## Other responses

- `400` — Invalid geofence ID, missing tenant ID, invalid query parameters, or missing pagination parameters
- `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/revisions/e1f64cbb488e/schema)
