Geofence API
Create, manage, and query virtual geographic boundaries. Check if a point is inside a geofence for delivery zones, restricted areas, and location-based alerts.
Try in Playground →Endpoint
POST
/v4/geofence/create.jsonAuthentication
Include your token in the request header:
X-Authorization-Token: your_token
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | Name for the geofence |
| geometry | object | GeoJSON polygon coordinates |
Code Examples
curl -X POST "https://apihub.latlong.ai/v4/geofence/create.json" \
-H "X-Authorization-Token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"coordinates": [
[
77.59,
12.97
],
[
77.6,
12.98
]
]
}'Example Response
JSON
{
"status": "success",
"geofence_id": "gf_abc123",
"message": "Geofence created successfully"
}Related Endpoints
GET
/v4/geofence/contains.jsonGET
/v4/geofence/list.jsonGET
/v4/geofence/details.jsonPOST
/v4/geofence/update.json
