Skip to content

Geofences: Update

PUT /apps/{app_id}/geofences/{id}
Name Type Required Description
app_id string No id of the pulsate app
id string No id of the geofence
Name Type Required Description
geofence string Yes Geofence to be updated
geofence.name string No Name of the geofence
geofence.location array_double No Centre location of the geofence in a format of: [latitude, longitude]
geofence.shape string No can either be circle or polygon
geofence.radius string No Radius of the geofence (in metres or in feet). It is required if shape is “circle”.
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 PUT \
--url https://control.pulsatehq.com/api/v2/apps/{app_id}/geofences/{id} \
--header 'authorization: Token token={my_admin_api_token}' \
--header 'content-type: application/json' \
--data '{
"geofence": {
"name": "geofence_from_api",
"location": [50.042754135466986, 20.207290649414062],
"shape": "circle",
"radius": "101"
}
}'

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"
}