---
title: "Delete a geofence"
method: DELETE
path: "/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/"
tags: ["esper_cloud_api_Geofence"]
---

# Delete a geofence

`DELETE /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.

Permanently deletes a legacy geofence record by its UUID.Returns HTTP 204 with an empty body on success; the deletion is immediate and irreversible. Use this to remove legacy geofence records after their configurations have been migrated to blueprints.

**About Delete Geofence (Legacy)**

This endpoint removes a single legacy geofence from the enterprise. Unlike the blueprints system, which ties geofence lifecycle to blueprint deployment, this standalone record can be deleted independently. Before deleting, check device_count via GET to confirm whether any devices are still referencing the legacy geofence.

## Path parameters

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

## Response `204`

The resource was deleted successfully.

## 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)
