---
title: "Create Device Geofence"
method: POST
path: "/api/v1/devices/{device_id}/geofences"
tags: ["geofences"]
---

# Create Device Geofence

`POST /api/v1/devices/{device_id}/geofences`

## Request

- Base URL: `https://api.brumby.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.brumby.com/api/v1/devices/{device_id}/geofences`
- Auth: HTTP bearer

## Path parameters

- `device_id` string, required

## Request body

- GeofenceCreate: A new operating volume. Geometry is the screening engine's Volume verbatim and immutable once created — a moved fence is a different fence.
  - `name` string, required
  - `geometry` object, required
  - `ceiling_ft_agl` integer, required
  - `active` boolean
  - `farm_id` string, nullable
  - `paddock_id` string, nullable
  - `source` 'manual' | 'paddock'

## Response `201`

Successful Response

- GeofenceResponse
  - `geofence_id` string, uuid, required
  - `device_id` string, nullable, required
  - `farm_id` string, nullable, required
  - `paddock_id` string, nullable, required
  - `source` string, required
  - `name` string, required
  - `geometry` object, required
  - `ceiling_ft_agl` integer, required
  - `active` boolean, required
  - `created_by` string, required
  - `archived_at` string, date-time, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/brumby/apis/brumby-platform-api.md) - [All operations](https://skmtc.dev/brumby/apis/brumby-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/brumby/apis/brumby-platform-api/revisions/fe185e20813e?raw)
