Skip to content

Geofences: Create

POST /apps/{app_id}/geofences
Name Type Required Description
app_id string No id of the pulsate app
Name Type Required Description
geofence object Yes
geofence.name string Yes Name of the geofence
geofence.location string No Center location of the geofence in a format of: [latitude,longitude]
geofence.shape string No Type of geofence shape: circle or polygon
geofence.radius string No Radius of the geofence (in metres or in feets)
geofence.path string No List of points of the geofence. It is required if shape is “polygon”
Name Type Required Description
Authorization string Yes {my_admin_api_token}
Content-Type string No application/json
Terminal window
curl --request POST \
--url https://control.pulsatehq.com/api/v2/apps/{app_id}/geofences/ \
--header 'authorization: Token token={my_admin_api_token}' \
--header 'content-type: application/json' \
--data '{
"geofence": {
"name": "geofence_polysssssgon_from_api23",
"shape": "polygon",
"path": [
[
52.85951892166289,
18.52352854511544
],
[
51.10042408720422,
16.69979807636544
],
[
50.68463237271521,
21.95126292011544
]
]
}
}'

200

{
"id": "67f66a59a46a6f7d4ade58b6",
"name": "geofence",
"created_at": "2025-04-09T12:38:49Z",
"updated_at": "2025-04-09T12:38:49Z",
"guid": "DCElRDSa",
"groups": [],
"location": [
33.73496438,
73.07455137
],
"type": "enter",
"shape": "circle",
"radius": 965,
"radius_unit": "feet"
}