---
title: "Update geofence information"
method: PUT
path: "/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/"
tags: ["esper_cloud_api_Geofence"]
---

# Update geofence information

`PUT /v0/enterprise/{enterprise_id}/geofence/{geofence_id}/`

## Request

- Base URL: `https://develop-api.esper.cloud/api`
- URL: `https://develop-api.esper.cloud/api/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/`
- Auth: HTTP bearer

⚠️ Legacy endpoint. Android only. Geofence configuration is now managed through blueprints. Use the blueprints endpoints (/api/v2/blueprints/) to create and manage geofences going forward.

Performs a full replacement update on an existing legacy geofence record.All writable fields must be included in the request body; omitting a field will overwrite it with a null or default value. Returns the updated Geofence object on success.

**About Update Geofence — Full (Legacy)**

This PUT endpoint replaces the entire geofence definition for the specified geofence_id. It operates on the same legacy standalone geofence system as the other /geofence/ path endpoints. Because geofences are now configured within blueprints via /api/v2/blueprints/, edits here will not affect blueprint-managed geofence behavior. Use blueprints for all active geofence configuration changes.

## Path parameters

- `geofence_id` string, uuid, required
- `enterprise_id` string, uuid, required

## Request body `*/*`

- EsperCloudApiGeofence
  - `id` string, uuid: id of the geofence
  - `name` string, required: Name of the geofence
  - `description` string: A description about the geofence
  - `enterprise` string, uuid: id of the enterprise resource
  - `latitude` string, decimal, required: Latitude corresponding to the geofence
  - `longitude` string, decimal, required: Longitude corresponding to the geofence
  - `radius` integer: The radius within which the geofence should be applied
  - `radius_unit` 'KILOMETERS' | 'METERS' | 'MILES': The unit in which the radius is taken, eg - kilometers, meters etc
  - `device_actions` string[]: The actions to be performed on the device
  - `device_count` integer: Number of devices
  - `created_by` string: The user who created the geofence
  - `created_on` string, date-time: Date and time of when the geofence was created
  - `updated_on` string, date-time: Date and time of when the geofence was updated

## Response `200`

successful operation

- EsperCloudApiGeofence
  - `id` string, uuid: id of the geofence
  - `name` string, required: Name of the geofence
  - `description` string: A description about the geofence
  - `enterprise` string, uuid: id of the enterprise resource
  - `latitude` string, decimal, required: Latitude corresponding to the geofence
  - `longitude` string, decimal, required: Longitude corresponding to the geofence
  - `radius` integer: The radius within which the geofence should be applied
  - `radius_unit` 'KILOMETERS' | 'METERS' | 'MILES': The unit in which the radius is taken, eg - kilometers, meters etc
  - `device_actions` string[]: The actions to be performed on the device
  - `device_count` integer: Number of devices
  - `created_by` string: The user who created the geofence
  - `created_on` string, date-time: Date and time of when the geofence was created
  - `updated_on` string, date-time: Date and time of when the geofence was updated

## Other responses

- `400`: Bad Request
- `401`: Authorization information is missing or invalid
- `404`: Not Found
- `500`: Internal server error

---

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