Skip to main content

Incidents

A single event rarely tells you that a home needs attention. An incident is a run of one home's events in one category that met a rule, for example 3 smoking alerts within 30 days. Minut works incidents out from the home's events for every organization, and the endpoints here let you read them.

Every request needs a valid access token; see Authentication for Partners.

Categories and rules​

CategoryEvents that countDefault rule
smokingsmoking_detected3 within 30 days
noisenoise_detected, one per disturbance3 within 14 days
tampertamper_removed, casing_tamper_detectedEvery event is an incident
water_leakwater_leak_detectedEvery event is an incident
indoor_climatetemperature_high, temperature_low, humidity_high, humidity_low5 within 30 days

An organization can change the rule for smoking, noise and tamper, so read the rule on each incident instead of assuming the default. In a Minut Living (residential) organization, noise uses a chaining rule unless the organization has set its own: 3 noise_detected events, each at most 4 hours after the previous one, and every alert level of a disturbance counts.

Get the incidents of an organization​

GET /organizations/{organization_id}/incidents lists the incidents of the organization's homes, newest start first. GET /organizations lists the organizations your token has access to.

curl --request GET 'https://api.minut.com/v8/organizations/ORGANIZATION_ID/incidents?start_at=2026-05-01T00:00:00Z&end_at=2026-06-01T00:00:00Z' \
--header 'Authorization: Bearer ACCESS_TOKEN'
{
"incidents": [
{
"incident_id": "9007199254740993",
"home_id": "5ffff22ab167b70039f806fe",
"organization_id": "5ffff11ab167b70039f80111",
"homegroup_id": "5ffff33ab167b70039f80222",
"category": "smoking",
"started_at": "2026-05-03T19:12:00.000Z",
"ended_at": null,
"latest_event_at": "2026-05-20T21:40:00.000Z",
"rule": { "count": 3, "days": 30 },
"counts_by_event_type": { "smoking_detected": 4 }
}
],
"paging": {
"total_count": 1,
"limit": 10,
"offset": 0
}
}

You get the incidents of the homes whose events you can read. A member of the organization sees all of its homes. Someone who was only added to some buildings or homes sees those, and an empty list if they can read none.

Get the incidents of a home​

GET /organizations/{organization_id}/homes/{home_id}/incidents returns the same list for one home, with the same filters and paging. It needs the access that reading the home's events does. A home you cannot read, or that does not belong to the organization, responds with 404.

curl --request GET 'https://api.minut.com/v8/organizations/ORGANIZATION_ID/homes/HOME_ID/incidents' \
--header 'Authorization: Bearer ACCESS_TOKEN'

Filtering and paging​

Both endpoints accept the same query parameters, all optional:

  • start_at / end_at: restrict the list to the incidents that overlap a period. Both are ISO-8601 timestamps in UTC. An incident that started before the period, or runs past it, is included whole. end_at must be after start_at.
  • category: a comma-separated list of categories to include, for example category=smoking,noise.
  • limit / offset: page size (1 to 100, default 10) and starting position. Increase offset by limit until you receive fewer incidents than you asked for, as in Fetching Events.

Reading an incident​

  • started_at is when the first counted event happened, and latest_event_at when the latest one happened so far.
  • ended_at is null while the incident is ongoing, which means a new event of the category would still extend it. Once the rule's window (or, for a chaining rule, its max_gap_hours) has passed since latest_event_at, the incident can no longer grow and ended_at is the time of its last event. Under a rule where every event is an incident, ended_at equals started_at.
  • rule is the rule the incident met, as it was when the incident was evaluated: count events within days days, where days are 24 hour spans counted back from the latest event. A rule with max_gap_hours chains instead: read that field before days, which is then 0.
  • counts_by_event_type holds the counted events per event type, named as in the Events Reference.
  • homegroup_id is the homegroup (for example the building) the home is in, and is left out when the home is in none.

Incidents change as events arrive​

Incidents are derived from the home's events, so a stored incident is not final while it is ongoing:

  • A new event of the category extends an ongoing incident. It keeps its incident_id, and its latest_event_at and counts_by_event_type move on.
  • An event that arrives late can move an incident's start, or merge two incidents into one. The result has a new incident_id, and the incidents it replaced are no longer listed.

Treat incident_id as stable for as long as started_at does not change, and re-read a period you care about instead of assuming an earlier response is still complete. The incident_id here is not the incident_id on a noise event, which identifies a single noise disturbance.