# Geofences

**Geofences** are designated geographic areas that you can define. Once created, these areas can trigger **geofence entry ("geofence in")** and **geofence exit ("geofence out")** events. When a tracker enters or exits the defined area, the corresponding event is emitted.

Our API uses the **POLYGON** method to define geofences. You must ensure that the polygon coordinates accurately map to the intended area during creation.

**Example of a polygon geofence:**

```
POLYGON ((6.57955384860341 3.428432957806109, 6.4082822454249 3.44384423420928, 6.421780818038414 3.5975749615640495, 6.574921615748536 3.6404239396161984, 6.57955384860341 3.428432957806109))
```

Geofences can also be updated after creation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sendstackhq.com/live-tracking-apis/geofences.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
