Update Location Stay
PATCH
/users/{user_id}/location-stays/{stay_id}
const url = 'https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/location-stays/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"place_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/location-stays/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "place_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Correct a single auto-detected visit’s place. Stamps the chosen place’s name/source onto this
stay (or clears it back to the identify queue when place_id is null).
Note on durability: stays inside the job’s recent rolling window are deleted + recomputed on the next run, which re-resolves the place geometrically. So a lasting correction also depends on the chosen place actually being nearest to this spot — the client creates/moves a place at the visit’s centroid so the geometry agrees. Older (frozen) stays keep this stamp indefinitely.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”user_id
required
User Id
string format: uuid
stay_id
required
Stay Id
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
StayRead
A derived dwell cluster — where the user stayed and for how long.
object
arrived_at
required
Arrived At
string format: date-time
departed_at
required
Departed At
string format: date-time
duration_minutes
required
Duration Minutes
number
lat
required
Lat
number
lng
required
Lng
number
sample_count
required
Sample Count
integer
Examplegenerated
{ "arrived_at": "2026-04-15T12:00:00Z", "departed_at": "2026-04-15T12:00:00Z", "duration_minutes": 1, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "lat": 1, "lng": 1, "place_name": "example", "place_source": "example", "sample_count": 1}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}