---
title: "Associates a device to a geofence"
method: PUT
path: "/associations/v3/{trackingId}/geofences/{geofenceId}"
tags: ["Associations"]
---

# Associates a device to a geofence

`PUT /associations/v3/{trackingId}/geofences/{geofenceId}`

Associates the device with `trackingId` to the geofence with `geofenceId`.
Whenever the device enters or exits the associated geofence, an event is generated.

## Response `200`

Successful

Device already associated with the geofence

## Other responses

- `201` — Successful The device has been associated with the geofence
- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges
- `404` — Not Found The specified resource was not found

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/versions/efa162f7023c/schema)
