---
title: "Get Protect event messages"
method: GET
path: "/v1/subscribe/events"
tags: ["WebSocket updates"]
---

# Get Protect event messages

`GET /v1/subscribe/events`

## Request

- Base URL: `https://api.ui.com/v1/connector/consoles/942A6FF664C0000000000964970E0000000009E710560000000068A9873F:9999999999/proxy/protect/integration`
- URL: `https://api.ui.com/v1/connector/consoles/942A6FF664C0000000000964970E0000000009E710560000000068A9873F:9999999999/proxy/protect/integration/v1/subscribe/events`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ubiquiti/apis/unifi-protect-api/docs/v1/subscribe/events/get.ts> (a function with typed inputs; its response is checked against the schema)

A WebSocket subscription that broadcasts Protect events

## Response `200`

Success response

- union: An event that was created or updated
  - EventAdd
    - `type` 'add', required
    - `item` union, required
      - RingEvent: A device ring button has been pressed
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'ring', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorExtremeValueEvent: The value of a metric measured by a sensor has gone in or out of range
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorExtremeValues', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorType` object, required: Name of the metric measured by the sensor
            - `text` 'temperature' | 'light' | 'humidity' | 'aqi' | 'vape' | 'tvoc' | 'pm1p0' | 'pm2p5' | 'pm4p0' | 'pm10p0' | 'co2' | 'voc', required
          - `sensorValue` object, required
            - `text` number, required: Decimal value of the metric measured by the sensor
          - `status` object, required
            - `text` 'neutral' | 'low' | 'safe' | 'high' | 'unknown', required: What range does the measured metric fall into
      - SensorWaterLeakEvent: Water leak in the given mount point has started or ended
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorWaterLeak', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorMountType` object, required
            - `text` 'door' | 'window' | 'garage' | 'leak' | 'none', required: Mounting type of the sensor.
      - SensorTamperEvent: Sensor has started or finished being tampered with
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorTamper', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorBatteryLowEvent: Sensor battery level is getting low
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorBatteryLow', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorBatteryPercentage` object, required: Decimal value of the available sensor battery percentage
            - `number` number, required
      - SensorAlarmEvent: Sensor has started or finished enduring an alarming state
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorAlarm', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
      - SensorVapeEvent: Sensor has detected vape
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorVape', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorOpenEvent: Sensor in a given mount type has entered an open state
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorOpened', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorMountType` object, required
            - `text` 'door' | 'window' | 'garage' | 'leak' | 'none', required: Mounting type of the sensor.
      - SensorClosedEvent: Sensor in a given mount type has entered a closed state
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorClosed', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorMountType` object, required
            - `text` 'door' | 'window' | 'garage' | 'leak' | 'none', required: Mounting type of the sensor.
      - SensorSmokeTestEvent: Smoke detector test has been initiated
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeTest', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `source` 'remote' | 'local'
      - SensorSmokeBatteryLowEvent: Smoke/CO detector internal battery is low (replacement required)
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeBatteryLow', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorSmokeNeedsCleaningEvent: Smoke sensor requires cleaning
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeNeedsCleaning', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorSmokeFaultEvent: Smoke sensor fault detected
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeFault', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorCoFaultEvent: CO sensor fault detected
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorCoFault', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorSmokeEndOfLifeEvent: Smoke/CO detector has reached end of service life
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeEndOfLife', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorMotionEvent: Sensor has started or finished detecting motion
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorMotion', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorButtonPressedEvent: A sensor button has been pressed
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorButtonPressed', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `button` object, required: The button that was pressed
            - `text` 'function' | 'alarmHubButton' | 'arm' | 'disarm' | 'night' | 'panic' | 'left' | 'right' | 'input1' | 'input2', required
      - LightMotionEvent: Floodlight has encountered motion
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'lightMotion', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `device` string, required: The primary key of device
      - CameraMotionEvent: Camera has started or finished detecting motion
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'motion', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - CameraSmartDetectAudioEvent: Camera has started or finished a smart audio-based detection
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'smartAudioDetect', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `smartDetectTypes` string[], nullable, required
      - CameraSmartDetectZoneEvent: Camera has started or finished a smart video-based zone detection
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'smartDetectZone', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `smartDetectTypes` string[], nullable, required
      - CameraSmartDetectLineEvent: Camera has started or finished a smart video-based line detection
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'smartDetectLine', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `smartDetectTypes` string[], nullable, required
      - CameraSmartDetectLoiterEvent: Camera has started or finished a smart video-based loiter detection
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'smartDetectLoiterZone', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `smartDetectTypes` string[], nullable, required
      - RelayInputChangedEvent: A relay input has changed state (circuit opened or closed)
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'relayInputChanged', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `inputState` object, required: The state of the relay input circuit
            - `text` 'circuitClosed' | 'circuitOpen', required
          - `inputChannel` object, required: The channel index of the relay input
            - `text` string, required
      - AlarmHubMotionEvent: Alarm hub motion input has been triggered
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubMotion', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubEntryOpenedEvent: Alarm hub entry sensor has opened
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubEntryOpened', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubEntryClosedEvent: Alarm hub entry sensor has closed
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubEntryClosed', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubSmokeEvent: Alarm hub smoke detector has been triggered
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubSmoke', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubGlassBreakEvent: Alarm hub glass break detector has been triggered
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubGlassBreak', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubButtonPressEvent: Alarm hub emergency button has been pressed
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubButtonPress', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `button` object, required: The button that was pressed
            - `text` 'function' | 'alarmHubButton' | 'arm' | 'disarm' | 'night' | 'panic' | 'left' | 'right' | 'input1' | 'input2', required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubTamperEvent: Alarm hub input has been tampered with
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubTamper', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubRelaySwitchedEvent: Alarm hub relay output has been switched
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubRelaySwitched', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - AlarmHubBatteryLowEvent: Alarm hub battery level is low
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubBatteryLow', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - AlarmHubBatteryConnectedEvent: Alarm hub battery has been connected
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubBatteryConnected', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - NfcCardScannedEvent: An NFC card was scanned at a device
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'nfcCardScanned', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` NfcMetadata, required
          - `nfc` object, required
            - `ulpId` string, nullable, required: The unique id of the UniFi Identity user. Matches the id field of the corresponding UlpUser. Matches the ucoreUserId field of the corresponding Protect User. Null if the credential was not recognized.
      - FingerprintIdentifiedEvent: A fingerprint was scanned at a device
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'fingerprintIdentified', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` FingerprintMetadata, required
          - `fingerprint` object, required
            - `ulpId` string, nullable, required: The unique id of the UniFi Identity user. Matches the id field of the corresponding UlpUser. Matches the ucoreUserId field of the corresponding Protect User. Null if the credential was not recognized.
  - EventUpdate
    - `type` 'update', required
    - `item` union, required
      - RingEvent: A device ring button has been pressed
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'ring', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorExtremeValueEvent: The value of a metric measured by a sensor has gone in or out of range
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorExtremeValues', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorType` object, required: Name of the metric measured by the sensor
            - `text` 'temperature' | 'light' | 'humidity' | 'aqi' | 'vape' | 'tvoc' | 'pm1p0' | 'pm2p5' | 'pm4p0' | 'pm10p0' | 'co2' | 'voc', required
          - `sensorValue` object, required
            - `text` number, required: Decimal value of the metric measured by the sensor
          - `status` object, required
            - `text` 'neutral' | 'low' | 'safe' | 'high' | 'unknown', required: What range does the measured metric fall into
      - SensorWaterLeakEvent: Water leak in the given mount point has started or ended
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorWaterLeak', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorMountType` object, required
            - `text` 'door' | 'window' | 'garage' | 'leak' | 'none', required: Mounting type of the sensor.
      - SensorTamperEvent: Sensor has started or finished being tampered with
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorTamper', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorBatteryLowEvent: Sensor battery level is getting low
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorBatteryLow', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorBatteryPercentage` object, required: Decimal value of the available sensor battery percentage
            - `number` number, required
      - SensorAlarmEvent: Sensor has started or finished enduring an alarming state
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorAlarm', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
      - SensorVapeEvent: Sensor has detected vape
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorVape', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorOpenEvent: Sensor in a given mount type has entered an open state
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorOpened', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorMountType` object, required
            - `text` 'door' | 'window' | 'garage' | 'leak' | 'none', required: Mounting type of the sensor.
      - SensorClosedEvent: Sensor in a given mount type has entered a closed state
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorClosed', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `sensorMountType` object, required
            - `text` 'door' | 'window' | 'garage' | 'leak' | 'none', required: Mounting type of the sensor.
      - SensorSmokeTestEvent: Smoke detector test has been initiated
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeTest', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `source` 'remote' | 'local'
      - SensorSmokeBatteryLowEvent: Smoke/CO detector internal battery is low (replacement required)
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeBatteryLow', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorSmokeNeedsCleaningEvent: Smoke sensor requires cleaning
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeNeedsCleaning', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorSmokeFaultEvent: Smoke sensor fault detected
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeFault', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorCoFaultEvent: CO sensor fault detected
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorCoFault', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorSmokeEndOfLifeEvent: Smoke/CO detector has reached end of service life
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorSmokeEndOfLife', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorMotionEvent: Sensor has started or finished detecting motion
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorMotion', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - SensorButtonPressedEvent: A sensor button has been pressed
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'sensorButtonPressed', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `button` object, required: The button that was pressed
            - `text` 'function' | 'alarmHubButton' | 'arm' | 'disarm' | 'night' | 'panic' | 'left' | 'right' | 'input1' | 'input2', required
      - LightMotionEvent: Floodlight has encountered motion
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'lightMotion', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `device` string, required: The primary key of device
      - CameraMotionEvent: Camera has started or finished detecting motion
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'motion', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - CameraSmartDetectAudioEvent: Camera has started or finished a smart audio-based detection
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'smartAudioDetect', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `smartDetectTypes` string[], nullable, required
      - CameraSmartDetectZoneEvent: Camera has started or finished a smart video-based zone detection
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'smartDetectZone', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `smartDetectTypes` string[], nullable, required
      - CameraSmartDetectLineEvent: Camera has started or finished a smart video-based line detection
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'smartDetectLine', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `smartDetectTypes` string[], nullable, required
      - CameraSmartDetectLoiterEvent: Camera has started or finished a smart video-based loiter detection
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'smartDetectLoiterZone', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `smartDetectTypes` string[], nullable, required
      - RelayInputChangedEvent: A relay input has changed state (circuit opened or closed)
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'relayInputChanged', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object, required
          - `inputState` object, required: The state of the relay input circuit
            - `text` 'circuitClosed' | 'circuitOpen', required
          - `inputChannel` object, required: The channel index of the relay input
            - `text` string, required
      - AlarmHubMotionEvent: Alarm hub motion input has been triggered
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubMotion', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubEntryOpenedEvent: Alarm hub entry sensor has opened
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubEntryOpened', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubEntryClosedEvent: Alarm hub entry sensor has closed
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubEntryClosed', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubSmokeEvent: Alarm hub smoke detector has been triggered
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubSmoke', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubGlassBreakEvent: Alarm hub glass break detector has been triggered
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubGlassBreak', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubButtonPressEvent: Alarm hub emergency button has been pressed
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubButtonPress', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `button` object, required: The button that was pressed
            - `text` 'function' | 'alarmHubButton' | 'arm' | 'disarm' | 'night' | 'panic' | 'left' | 'right' | 'input1' | 'input2', required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubTamperEvent: Alarm hub input has been tampered with
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubTamper', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` object
          - `pin` object, required: The alarm hub input pin channel
            - `text` string, required
          - `status` object, required: The status of the alarm hub input
            - `text` string, required
          - `alarmType` object, required: A type of sensor alarm
            - `text` 'smoke' | 'CO' | 'glassBreak' | 'sensorButtonPress' | 'tamper' | 'short' | 'cut', required
          - `deviceId` object, required: The device ID of the alarm hub
            - `text` string, required
          - `deviceName` object, required: The configured name of the input
            - `text` string, required
      - AlarmHubRelaySwitchedEvent: Alarm hub relay output has been switched
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubRelaySwitched', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - AlarmHubBatteryLowEvent: Alarm hub battery level is low
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubBatteryLow', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - AlarmHubBatteryConnectedEvent: Alarm hub battery has been connected
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'alarmHubBatteryConnected', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
      - NfcCardScannedEvent: An NFC card was scanned at a device
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'nfcCardScanned', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` NfcMetadata, required
          - `nfc` object, required
            - `ulpId` string, nullable, required: The unique id of the UniFi Identity user. Matches the id field of the corresponding UlpUser. Matches the ucoreUserId field of the corresponding Protect User. Null if the credential was not recognized.
      - FingerprintIdentifiedEvent: A fingerprint was scanned at a device
        - `id` string, required: The primary key of event
        - `modelKey` 'event', required: The model key of the event
        - `type` 'fingerprintIdentified', required
        - `start` number, required: Unix timestamp of the start time of the event.
        - `end` number, nullable: Unix timestamp of the end time of the event.
        - `device` string, required: The primary key of device
        - `metadata` FingerprintMetadata, required
          - `fingerprint` object, required
            - `ulpId` string, nullable, required: The unique id of the UniFi Identity user. Matches the id field of the corresponding UlpUser. Matches the ucoreUserId field of the corresponding Protect User. Null if the credential was not recognized.

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/ubiquiti/apis/unifi-protect-api.md) - [All operations](https://skmtc.dev/ubiquiti/apis/unifi-protect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ubiquiti/apis/unifi-protect-api/revisions/e341e1381db1?raw)
