Download OpenAPI specification:Download
The LaylaElectric REST API lets you manage your Layla account, properties, devices, alarms, statistics, notifications and reports.
Each endpoint lives at a versioned path under the API base — e.g.
/v1/properties or /v3/properties/dashboard. The version is part of the
path itself (it is not in the server URL), so different endpoints can
independently move to a newer version without breaking older callers.
The version that each route lives at is shown in the path of every
operation below. Most routes are at v1; a few newer dashboard / status
routes are at v3.
PATCH /v1/users/self.start and end date-time parameters are interpreted in the property's
timezone unless the endpoint says otherwise.message field and the relevant HTTP
status code (400, 401, 403, 404, 409, 429, 500).Returns the profile of the user that owns the bearer token, including their preferences, notification settings and a presigned URL to their profile picture.
{- "name": "string",
- "accepted_policy": 1,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD",
- "language": "en",
- "temperature_unit": "C"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}, - "alarm_notification_preferences": {
- "property1": {
- "email": true,
- "push": true
}, - "property2": {
- "email": true,
- "push": true
}
}, - "notification_frequency": [
- "realtime"
], - "is_onboarded": true,
- "picture_preview_url": "string",
- "total_device_count": 0
}Replaces the profile in full. Use PATCH if you only want to update a few fields.
| name required | string |
| accepted_policy | integer [ 0 .. 1 ] 1 once the user has accepted the latest policy versions. |
string | |
| address | string |
| phone | string |
| company | string |
| title | string |
object | |
object Channel-level toggles for all notifications. | |
object Per-alarm-type channel toggles (email/push). | |
| notification_frequency | Array of strings Items Enum: "realtime" "daily" "weekly" |
| is_onboarded | boolean |
{- "name": "string",
- "accepted_policy": 1,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD",
- "language": "en",
- "temperature_unit": "C"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}, - "alarm_notification_preferences": {
- "property1": {
- "email": true,
- "push": true
}, - "property2": {
- "email": true,
- "push": true
}
}, - "notification_frequency": [
- "realtime"
], - "is_onboarded": true
}{- "name": "string",
- "accepted_policy": 1,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD",
- "language": "en",
- "temperature_unit": "C"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}, - "alarm_notification_preferences": {
- "property1": {
- "email": true,
- "push": true
}, - "property2": {
- "email": true,
- "push": true
}
}, - "notification_frequency": [
- "realtime"
], - "is_onboarded": true,
- "picture_preview_url": "string",
- "total_device_count": 0
}Update one or more profile fields without resending the whole user object. Use this to flip notification preferences, change language/temperature unit, or accept the latest policy.
| name | string |
| accepted_policy | integer [ 0 .. 1 ] 1 once the user has accepted the latest policy versions. |
string | |
| address | string |
| phone | string |
| company | string |
| title | string |
object | |
object Channel-level toggles for all notifications. | |
object Per-alarm-type channel toggles (email/push). | |
| notification_frequency | Array of strings Items Enum: "realtime" "daily" "weekly" |
| is_onboarded | boolean |
{- "name": "string",
- "accepted_policy": 1,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD",
- "language": "en",
- "temperature_unit": "C"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}, - "alarm_notification_preferences": {
- "property1": {
- "email": true,
- "push": true
}, - "property2": {
- "email": true,
- "push": true
}
}, - "notification_frequency": [
- "realtime"
], - "is_onboarded": true
}{- "name": "string",
- "accepted_policy": 1,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD",
- "language": "en",
- "temperature_unit": "C"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}, - "alarm_notification_preferences": {
- "property1": {
- "email": true,
- "push": true
}, - "property2": {
- "email": true,
- "push": true
}
}, - "notification_frequency": [
- "realtime"
], - "is_onboarded": true,
- "picture_preview_url": "string",
- "total_device_count": 0
}Returns the properties the user is a member of. Use the fields
parameter to enrich the result with optional computed data (savings,
alarm counts, etc) — only ask for what you need to keep the response
fast.
| id | string Get a single property by ID (filtered server-side). |
| currency | string (CurrencyCode) Enum: "USD" "EUR" "GBP" "ILS" "BRL" "MXN" Override the currency for any monetary fields in the response. |
| fields | Array of strings Items Enum: "users" "alarm_event_counts" "monthly_savings" "total_savings" "total_efficiency_gains" "alarm_states" "devices" Comma-separated list of extra fields to compute and include. Each one adds latency, so be selective. |
| filters | Array of strings Items Enum: "eco" "noise_alarm" "security_alarm" Restrict results to properties matching a given feature/alarm. |
| sort_by | string Enum: "money_saved" "noise_events" "crowd_events" "security_events" Sort key applied server-side. |
[- {
- "name": "string",
- "category": "string",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": 1,
- "id": "string",
- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "enabled_tier_features": [
- "climate"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "alarm_states": [
- {
- "device_id": "string",
- "name": "noise_alarm",
- "state": "ok",
- "sub_state": "loud_noise"
}
]
}
]Returns the full dashboard view in a single call: properties, subscription state, aggregated alarm summary and per-pillar status. Designed for the app home screen.
| timezone required | string IANA timezone (e.g. |
| fields | Array of strings Items Enum: "status" "last_day_overview" "alarm_event_counts" "properties" "enabled_alarms" "alarm_states" "status_by_pillar" "ir" Comma-separated list of optional sections to include in the response.
Omit the parameter to receive all sections. Each section is only
populated when explicitly requested (or when Top-level sections:
Per-property sub-fields (only relevant when
Examples:
|
| start | string <date-time> Start of the date range (inclusive), interpreted in the supplied |
| end | string <date-time> End of the date range (exclusive), interpreted in the supplied |
{- "meta": {
- "timezone": "string",
- "day": "2019-08-24",
- "day_start": "2019-08-24T14:15:22Z",
- "day_end": "2019-08-24T14:15:22Z"
}, - "has_subscription": true,
- "status": {
- "sensors_online": {
- "online": 0,
- "offline": 0,
- "total": 0
}, - "wifi": {
- "percent": 0
}
}, - "last_day_overview": {
- "noise": {
- "avg_noise": 0,
- "max_noise": 0,
- "max_at": "2019-08-24T14:15:22Z",
- "property": {
- "id": "string",
- "name": "string"
}
}, - "activity": {
- "level": "low",
- "peak_at": "2019-08-24T14:15:22Z",
- "property": {
- "id": "string",
- "name": "string"
}, - "occupancy_max": 0
}, - "climate": {
- "temperature": {
- "current": 0,
- "min": 0,
- "max": 0
}, - "humidity": {
- "current": 0,
- "min": 0,
- "max": 0
}
}, - "air_quality": {
- "iaq": 0
}
}, - "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "properties": [
- {
- "id": "string",
- "name": "string",
- "status": "online",
- "has_subscription": true,
- "status_by_pillar": {
- "property1": {
- "devices_online": 0,
- "devices_total": 0,
- "status": "online"
}, - "property2": {
- "devices_online": 0,
- "devices_total": 0,
- "status": "online"
}
}, - "enabled_alarms": [
- "noise_alarm"
], - "alarm_states": [
- {
- "device_id": "string",
- "name": "noise_alarm",
- "state": "ok",
- "sub_state": "loud_noise"
}
], - "ir": {
- "is_learned": true,
- "devices": [
- {
- "device_id": "string",
- "is_learned": true
}
]
}
}
]
}Returns a lightweight status payload (online / offline) and per-pillar breakdown for each property.
| property_ids | Array of strings Comma-separated property IDs. If omitted, all the user's properties are returned. |
{- "properties": [
- {
- "id": "string",
- "name": "string",
- "status": "online",
- "status_by_pillar": {
- "property1": {
- "devices_online": 0,
- "devices_total": 0,
- "status": "online"
}, - "property2": {
- "devices_online": 0,
- "devices_total": 0,
- "status": "online"
}
}
}
]
}Returns online/offline state and a per-pillar status breakdown for one property.
| id required | string |
{- "id": "string",
- "name": "string",
- "status": "online",
- "status_by_pillar": {
- "property1": {
- "devices_online": 0,
- "devices_total": 0,
- "status": "online"
}, - "property2": {
- "devices_online": 0,
- "devices_total": 0,
- "status": "online"
}
}
}Replaces all editable fields of the property.
| id required | string |
| name required | string <= 100 characters |
| category required | string <= 20 characters Free-form category slug (typically |
| address required | string <= 255 characters |
| timezone required | string IANA timezone (e.g. |
object | |
| enabled | integer [ 0 .. 1 ] 1 = active, 0 = paused. |
{- "name": "string",
- "category": "string",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": 1
}{- "name": "string",
- "category": "string",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": 1,
- "id": "string",
- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "enabled_tier_features": [
- "climate"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "alarm_states": [
- {
- "device_id": "string",
- "name": "noise_alarm",
- "state": "ok",
- "sub_state": "loud_noise"
}
]
}| id required | string |
| name | string <= 100 characters |
| category | string <= 20 characters Free-form category slug (typically |
| address | string <= 255 characters |
| timezone | string IANA timezone (e.g. |
object | |
| enabled | integer [ 0 .. 1 ] 1 = active, 0 = paused. |
{- "name": "string",
- "category": "string",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": 1
}{- "name": "string",
- "category": "string",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": 1,
- "id": "string",
- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "enabled_tier_features": [
- "climate"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "alarm_states": [
- {
- "device_id": "string",
- "name": "noise_alarm",
- "state": "ok",
- "sub_state": "loud_noise"
}
]
}Enables or disables alarms (and their quiet-hours variants) for every device in the property. Send only the alarms you want to change — any parameter you omit is left untouched.
| id required | string |
| noise_alarm | boolean |
| noise_alarm_quiet_hours | boolean |
| occupancy_alarm | boolean |
| occupancy_alarm_quiet_hours | boolean |
| security_alarm | boolean |
| alarm_schedule | boolean Enable or disable the per-device alarm scheduling feature. |
| mold_alarm | boolean |
| mold_alarm_quiet_hours | boolean |
| smoke_alarm | boolean |
| smoke_alarm_quiet_hours | boolean |
| co_alarm | boolean Carbon-monoxide alarm. |
| co_alarm_quiet_hours | boolean |
Returns aggregated measurements (across all devices in the property) at
the chosen granularity. Use this for property-level charts. You can
optionally restrict the aggregation to a subset of devices via
device_ids.
| id required | string |
| measure required | string (MeasureName) Enum: "power" "temperature" "humidity" "noise" "occupancy_min" "occupancy_max" "wifi_rssi" "net_qlt" "aq_iaq" "mold_risk_index" A measurement type recorded by the device. |
| device_ids | Array of strings Comma-separated device IDs to aggregate over. If omitted, all the property's devices are included. |
| granularity | string (TimeGranularity) Enum: "minutes" "15min" "hours" Bucket size for the returned series. |
| start | string <date-time> Start of the range (inclusive), in the property's timezone. If omitted, defaults to the earliest device creation date. |
| end | string <date-time> End of the range (exclusive), in the property's timezone. If omitted, defaults to now. |
[- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
]Returns the devices in a single property. Use fields to add computed
data such as latest sensor values or active alarm state.
| property_id | string Restrict results to a single property. |
| fields | Array of strings Items Enum: "alarm_event_counts" "latest_values" "in_alarm" "snoozed" "active_alarms" Comma-separated optional fields. |
[- {
- "device_mac": "string",
- "category": "EM",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}, - "schedule_hours": {
- "start": "string",
- "end": "string",
- "days": [
- 1
]
}
}
], - "features": [
- "eco"
], - "tier_features": [
- "climate"
], - "device_pillar": "noise",
- "settings": {
- "irMode": "smart",
- "noise": {
- "ignore_short_bursts_enabled": true,
- "focus_on_sustained_noise_enabled": true,
- "smart_filters_enabled": true,
- "alert_escalation_enabled": true
}, - "air_quality": {
- "monitors": {
- "tvoc_enabled": true,
- "eco2_enabled": true,
- "pressure_enabled": true
}
}, - "activity": {
- "calendar_automation_enabled": true,
- "calendar_ical_url": "string",
- "pro_alert_escalation_enabled": true
}, - "smart_ac": {
- "pure_boost_enabled": true
}
}, - "id": "string",
- "property_id": "string",
- "serial_number": "string",
- "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "latest_values": [
- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
], - "in_alarm": [
- "string"
], - "snoozed": [
- "string"
], - "active_alarms": [
- {
- "name": "noise_alarm_start",
- "state": "in_alarm",
- "first_datapoint_timestamp": "2019-08-24T14:15:22Z"
}
], - "connection_status": "online",
- "last_updated_at": "2019-08-24T14:15:22Z",
- "trees": 0,
- "ac_control_active": true,
- "air_quality_extended_settings_available": true
}
]Returns every device the user has access to, across every property — handy for "all devices" screens.
| property_id | string Optional filter; behaves like |
[- {
- "device_mac": "string",
- "category": "EM",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}, - "schedule_hours": {
- "start": "string",
- "end": "string",
- "days": [
- 1
]
}
}
], - "features": [
- "eco"
], - "tier_features": [
- "climate"
], - "device_pillar": "noise",
- "settings": {
- "irMode": "smart",
- "noise": {
- "ignore_short_bursts_enabled": true,
- "focus_on_sustained_noise_enabled": true,
- "smart_filters_enabled": true,
- "alert_escalation_enabled": true
}, - "air_quality": {
- "monitors": {
- "tvoc_enabled": true,
- "eco2_enabled": true,
- "pressure_enabled": true
}
}, - "activity": {
- "calendar_automation_enabled": true,
- "calendar_ical_url": "string",
- "pro_alert_escalation_enabled": true
}, - "smart_ac": {
- "pure_boost_enabled": true
}
}, - "id": "string",
- "property_id": "string",
- "serial_number": "string",
- "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "latest_values": [
- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
], - "in_alarm": [
- "string"
], - "snoozed": [
- "string"
], - "active_alarms": [
- {
- "name": "noise_alarm_start",
- "state": "in_alarm",
- "first_datapoint_timestamp": "2019-08-24T14:15:22Z"
}
], - "connection_status": "online",
- "last_updated_at": "2019-08-24T14:15:22Z",
- "trees": 0,
- "ac_control_active": true,
- "air_quality_extended_settings_available": true
}
]{- "device_mac": "string",
- "category": "EM",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}, - "schedule_hours": {
- "start": "string",
- "end": "string",
- "days": [
- 1
]
}
}
], - "features": [
- "eco"
], - "tier_features": [
- "climate"
], - "device_pillar": "noise",
- "settings": {
- "irMode": "smart",
- "noise": {
- "ignore_short_bursts_enabled": true,
- "focus_on_sustained_noise_enabled": true,
- "smart_filters_enabled": true,
- "alert_escalation_enabled": true
}, - "air_quality": {
- "monitors": {
- "tvoc_enabled": true,
- "eco2_enabled": true,
- "pressure_enabled": true
}
}, - "activity": {
- "calendar_automation_enabled": true,
- "calendar_ical_url": "string",
- "pro_alert_escalation_enabled": true
}, - "smart_ac": {
- "pure_boost_enabled": true
}
}, - "id": "string",
- "property_id": "string",
- "serial_number": "string",
- "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "latest_values": [
- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
], - "in_alarm": [
- "string"
], - "snoozed": [
- "string"
], - "active_alarms": [
- {
- "name": "noise_alarm_start",
- "state": "in_alarm",
- "first_datapoint_timestamp": "2019-08-24T14:15:22Z"
}
], - "connection_status": "online",
- "last_updated_at": "2019-08-24T14:15:22Z",
- "trees": 0,
- "ac_control_active": true,
- "air_quality_extended_settings_available": true
}Update one or more device fields — rename it, change its pillar, toggle alarms on/off, edit thresholds, set quiet hours, etc.
| id required | string |
| device_mac | string MAC address printed on the device sticker. |
| category | string Enum: "EM" "SP" "v3.0" Device hardware category — |
| name | string <= 50 characters |
| enabled | boolean |
Array of objects (AlarmConfigurationModel) Alarm configuration objects (thresholds, quiet hours, schedules). | |
| features | Array of strings Items Value: "eco" |
| tier_features | Array of strings (TierFeature) Items Enum: "climate" "environment" "motion_safety" "safety" |
| device_pillar | string (DevicePillar) Enum: "noise" "air_quality" "smart_ac" Active feature set on a device — see |
object (DeviceSettingsModel) |
{- "device_mac": "string",
- "category": "EM",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}, - "schedule_hours": {
- "start": "string",
- "end": "string",
- "days": [
- 1
]
}
}
], - "features": [
- "eco"
], - "tier_features": [
- "climate"
], - "device_pillar": "noise",
- "settings": {
- "irMode": "smart",
- "noise": {
- "ignore_short_bursts_enabled": true,
- "focus_on_sustained_noise_enabled": true,
- "smart_filters_enabled": true,
- "alert_escalation_enabled": true
}, - "air_quality": {
- "monitors": {
- "tvoc_enabled": true,
- "eco2_enabled": true,
- "pressure_enabled": true
}
}, - "activity": {
- "calendar_automation_enabled": true,
- "calendar_ical_url": "string",
- "pro_alert_escalation_enabled": true
}, - "smart_ac": {
- "pure_boost_enabled": true
}
}
}{- "device_mac": "string",
- "category": "EM",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}, - "schedule_hours": {
- "start": "string",
- "end": "string",
- "days": [
- 1
]
}
}
], - "features": [
- "eco"
], - "tier_features": [
- "climate"
], - "device_pillar": "noise",
- "settings": {
- "irMode": "smart",
- "noise": {
- "ignore_short_bursts_enabled": true,
- "focus_on_sustained_noise_enabled": true,
- "smart_filters_enabled": true,
- "alert_escalation_enabled": true
}, - "air_quality": {
- "monitors": {
- "tvoc_enabled": true,
- "eco2_enabled": true,
- "pressure_enabled": true
}
}, - "activity": {
- "calendar_automation_enabled": true,
- "calendar_ical_url": "string",
- "pro_alert_escalation_enabled": true
}, - "smart_ac": {
- "pure_boost_enabled": true
}
}, - "id": "string",
- "property_id": "string",
- "serial_number": "string",
- "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "latest_values": [
- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
], - "in_alarm": [
- "string"
], - "snoozed": [
- "string"
], - "active_alarms": [
- {
- "name": "noise_alarm_start",
- "state": "in_alarm",
- "first_datapoint_timestamp": "2019-08-24T14:15:22Z"
}
], - "connection_status": "online",
- "last_updated_at": "2019-08-24T14:15:22Z",
- "trees": 0,
- "ac_control_active": true,
- "air_quality_extended_settings_available": true
}| id required | string |
| measure required | string (MeasureName) Enum: "power" "temperature" "humidity" "noise" "occupancy_min" "occupancy_max" "wifi_rssi" "net_qlt" "aq_iaq" "mold_risk_index" A measurement type recorded by the device. |
| granularity | string (TimeGranularity) Enum: "minutes" "15min" "hours" Bucket size for time-series endpoints. If you omit the parameter the server will pick a sensible value based on the date range. |
| start | string <date-time> Start of the range (inclusive), in the property's timezone. |
| end | string <date-time> End of the range (exclusive), in the property's timezone. |
[- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
]Sets the no-motion duration (seconds) before eco-mode decides the room is empty and turns the AC off.
| id required | string |
| last_PIR_detected_time_th required | integer >= 0 Seconds without motion before triggering eco-mode. |
{- "last_PIR_detected_time_th": 0
}{- "device_id": "string",
- "device_mac": "string",
- "last_PIR_detected_time_th": 0,
- "realtime_session": true,
- "message": "string"
}A pillar is the feature set the device is currently configured for —
e.g. noise (acoustic monitoring), air_quality or smart_ac.
Each device can only be in one pillar at a time. Activation-locked
devices cannot be switched until they have a paid subscription seat.
| id required | string |
| device_pillar required | string Enum: "noise" "air_quality" "smart_ac" |
{- "device_pillar": "noise"
}{- "device_id": "string",
- "device_mac": "string",
- "active_pillar": "string",
- "updated": true
}Sends a test pulse so the user can confirm the device controls their
AC. Pass mode: smart to use Layla's pre-mapped commands (when an AC
vendor/model is known) or mode: learn to replay the most recent
learned command. Optionally include an appliance_config block to
override the AC state for the test.
| id required | string |
| mode | string Enum: "smart" "learn" |
object (IrApplianceConfigModel) Per-AC state used by IR commands. Fields map 1-to-1 to the underlying IR library — leave any field out to keep the device's current setting. |
{- "mode": "smart",
- "appliance_config": {
- "vendor": "SAMSUNG",
- "model": -1,
- "power": "On",
- "mode": "Off",
- "celsius": "On",
- "degrees": 25,
- "fanspeed": "Auto",
- "swingv": "Off",
- "swingh": "Off",
- "quiet": "On",
- "turbo": "On",
- "light": "On",
- "filter": "On",
- "clean": "On",
- "beep": "On",
- "sleep": -1,
- "clock": -1
}
}Tells the device to turn the AC on or off at a specific moment in the future.
| id required | string |
| action required | string Enum: "on" "off" |
| scheduled_for required | string <date-time> |
{- "action": "on",
- "scheduled_for": "2019-08-24T14:15:22Z"
}Sets up a recurring AC schedule (e.g. "Mon-Fri, 8am-6pm") with optional AC vendor-specific settings (temperature, fan speed, mode).
| id required | string |
| enabled | boolean |
| days | Array of strings Items Enum: "mon" "tue" "wed" "thu" "fri" "sat" "sun" Days the schedule runs on. |
| start_time | string^[0-9]{2}:[0-9]{2}$ 24-hour time in HH:MM format. |
| end_time | string^[0-9]{2}:[0-9]{2}$ |
| change_ac_state | boolean If true, the device will actually switch the AC; if false, the schedule is silent. |
object (IrApplianceConfigModel) Per-AC state used by IR commands. Fields map 1-to-1 to the underlying IR library — leave any field out to keep the device's current setting. |
{- "enabled": true,
- "days": [
- "mon"
], - "start_time": "string",
- "end_time": "string",
- "change_ac_state": true,
- "appliance_config": {
- "vendor": "SAMSUNG",
- "model": -1,
- "power": "On",
- "mode": "Off",
- "celsius": "On",
- "degrees": 25,
- "fanspeed": "Auto",
- "swingv": "Off",
- "swingh": "Off",
- "quiet": "On",
- "turbo": "On",
- "light": "On",
- "filter": "On",
- "clean": "On",
- "beep": "On",
- "sleep": -1,
- "clock": -1
}
}Returns aggregated energy, costs, savings, efficiency-gains and alarm counts. Filter by property/device and optionally include period-over- period trends.
| category | string Property category to filter on ( |
| period | string Enum: "day" "two_days" "week" "month" "three_months" "year" "prev_day" "prev_two_days" "prev_week" "prev_month" "prev_three_months" "prev_year" Rolling window the statistics are computed over. The |
| currency | string (CurrencyCode) Enum: "USD" "EUR" "GBP" "ILS" "BRL" "MXN" ISO 4217 currency code. |
| property_id | string |
| device_id | string |
| fields | Array of strings Items Value: "trends" |
[- {
- "energy": 0,
- "costs": 0,
- "efficiency_gains": 0,
- "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "trends": {
- "costs": 0,
- "efficiency_gains": 0,
- "savings": {
- "costs": 0
}, - "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "change": 0
}
]
}
}
]Returns the number of alarm events of the given type over time, bucketed by granularity.
| name required | string Alarm/event name. |
| category | string |
| property_ids | Array of strings |
| device_ids | Array of strings |
| start | string <date-time> |
| end | string <date-time> |
| timezone | string |
| granularity | string (TimeGranularity) Enum: "minutes" "15min" "hours" Bucket size for time-series endpoints. If you omit the parameter the server will pick a sensible value based on the date range. |
[- {
- "timestamp": "2019-08-24T14:15:22Z",
- "value": 0
}
]Same as /summary but returns a value per property — handy for "top properties by alarm count" lists.
| name required | string |
| category | string |
| property_ids | Array of strings |
| device_ids | Array of strings |
| start | string <date-time> |
| end | string <date-time> |
| timezone | string |
{- "value": 0,
- "property": {
- "name": "string",
- "category": "string",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": 1,
- "id": "string",
- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "enabled_tier_features": [
- "climate"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "alarm_states": [
- {
- "device_id": "string",
- "name": "noise_alarm",
- "state": "ok",
- "sub_state": "loud_noise"
}
]
}
}Like the single-alarm version, but you can ask for several alarm types in one call.
| names | Array of strings (AlarmName) Items Enum: "noise_alarm" "noise_alarm_quiet_hours" "occupancy_alarm" "device_off_alarm" "device_off_alarm_multiple" "security_alarm" "mold_alarm" "smoke_alarm" "co_alarm" "air_quality_alarm" "bvoc_alarm" "bvoc_spike_alarm" "co2_alarm" "co2_high_guidance" "iaq_ventilation_guidance" |
| category | string |
| property_ids | Array of strings |
| device_ids | Array of strings |
| start | string <date-time> |
| end | string <date-time> |
| timezone | string |
{- "value": 0,
- "name": "noise_alarm",
- "property": {
- "name": "string",
- "category": "string",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": 1,
- "id": "string",
- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "enabled_tier_features": [
- "climate"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm_start",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "alarm_states": [
- {
- "device_id": "string",
- "name": "noise_alarm",
- "state": "ok",
- "sub_state": "loud_noise"
}
]
}
}Returns the user's notifications, newest first. Filter by property,
device, read status and type, optionally restrict to a date range,
and paginate via limit / offset.
| property_id | string Restrict to a single property the user has access to. |
| device_id | string Restrict to a single device. |
| seen | boolean Filter by read/unread status. Omit to return both. |
| types | Array of strings (NotificationTypeName) Items Enum: "noise_alarm_start" "noise_alarm_end" "noise_alarm_quiet_hours_start" "noise_alarm_quiet_hours_end" "occupancy_alarm_start" "occupancy_alarm_end" "device_off_alarm_start" "device_off_alarm_end" "device_off_alarm_multiple_start" "device_off_alarm_multiple_end" "security_alarm_start" "security_alarm_end" "mold_alarm_start" "mold_alarm_end" "smoke_alarm_start" "smoke_alarm_end" "co_alarm_start" "co_alarm_end" "air_quality_alarm_start" "air_quality_alarm_end" "bvoc_alarm_start" "bvoc_alarm_end" "bvoc_spike_alarm_start" "bvoc_spike_alarm_end" "co2_alarm_start" "co2_alarm_end" "co2_high_guidance_start" "co2_high_guidance_end" "iaq_ventilation_guidance_start" "iaq_ventilation_guidance_end" "eco_mode_enabled" Comma-separated list of notification types to include. |
| start | string <date-time> Start of the date range (inclusive). Send together with |
| end | string <date-time> End of the date range (exclusive). Send together with |
| timezone | string IANA timezone the |
| limit | integer >= 1 Maximum number of notifications to return. |
| offset | integer >= 0 Number of notifications to skip (for pagination). |
| locale | string (LanguageCode) Enum: "en" "es" "fr" "pt" "de" "it" "el" "ja" Two-letter language code (e.g. |
[- {
- "id": "string",
- "property_id": "string",
- "property_name": "string",
- "device_id": "string",
- "title": "string",
- "body": "string",
- "in_app_text": "string",
- "type": "noise_alarm_start",
- "payload": {
- "threshold_value": "string",
- "threshold_label": "string",
- "duration": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "seen": true
}
]Used by dashboard tiles — one row per property, holding only the most recent matching notification.
| property_ids | Array of strings Comma-separated property IDs. If omitted, all the user's properties are included. |
| types | Array of strings (NotificationTypeName) Items Enum: "noise_alarm_start" "noise_alarm_end" "noise_alarm_quiet_hours_start" "noise_alarm_quiet_hours_end" "occupancy_alarm_start" "occupancy_alarm_end" "device_off_alarm_start" "device_off_alarm_end" "device_off_alarm_multiple_start" "device_off_alarm_multiple_end" "security_alarm_start" "security_alarm_end" "mold_alarm_start" "mold_alarm_end" "smoke_alarm_start" "smoke_alarm_end" "co_alarm_start" "co_alarm_end" "air_quality_alarm_start" "air_quality_alarm_end" "bvoc_alarm_start" "bvoc_alarm_end" "bvoc_spike_alarm_start" "bvoc_spike_alarm_end" "co2_alarm_start" "co2_alarm_end" "co2_high_guidance_start" "co2_high_guidance_end" "iaq_ventilation_guidance_start" "iaq_ventilation_guidance_end" "eco_mode_enabled" Comma-separated list of notification types to include. |
| start required | string <date-time> Earliest notification timestamp to consider, interpreted in |
| timezone required | string IANA timezone for |
| locale | string (LanguageCode) Enum: "en" "es" "fr" "pt" "de" "it" "el" "ja" Language code used to translate notification titles/bodies.
Falls back to the user's preference, then the |
[- {
- "id": "string",
- "property_id": "string",
- "property_name": "string",
- "device_id": "string",
- "title": "string",
- "body": "string",
- "in_app_text": "string",
- "type": "noise_alarm_start",
- "payload": {
- "threshold_value": "string",
- "threshold_label": "string",
- "duration": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "seen": true
}
]Mark by IDs (ids) and/or all notifications under a property (property_id).
| ids | Array of strings |
| property_id | string |
{- "ids": [
- "string"
], - "property_id": "string"
}Generates and emails a summary report for one or more properties. Choose the period (last day, week, month, etc) and the report flavours (owner / smoke / noise / executive). The result arrives by email — this endpoint does not return the PDF directly.
| property_ids required | Array of strings |
| types | Array of strings Items Enum: "owner" "smoke" "noise" "executive" Which flavours of report to generate. |
| period required | string Enum: "day" "two_days" "week" "month" "three_months" "year" "all_time" |
{- "property_ids": [
- "string"
], - "types": [
- "owner"
], - "period": "day"
}Kicks off generation of a detailed incident report for a specific day or
date range and email-delivers a link. The endpoint returns immediately
with a report_id; poll /reports/{id} for progress.
Either date or both start_date and end_date are required.
| property_id required | string |
| property_name | string Optional friendly name to embed in the report. |
| report_types | Array of strings non-empty unique Items Enum: "noise" "crowd" "smoke" "mold" "air_quality" "activity" "temperature" "humidity" "security" "movement_count" "co" |
| date | string <date> Single day (YYYY-MM-DD). Use this OR |
| start_date | string <date> |
| end_date | string <date> |
| emails required | Array of strings <email> non-empty unique Email addresses to send the finished report to. |
{- "property_id": "string",
- "property_name": "string",
- "report_types": [
- "noise"
], - "date": "2019-08-24",
- "start_date": "2019-08-24",
- "end_date": "2019-08-24",
- "emails": [
- "user@example.com"
]
}{- "report_id": "string"
}Poll this endpoint after POST /v1/reports/incident. status transitions pending → processing → completed (report_link populated) or failed (error_message populated).
| id required | string |
{- "report_id": "string",
- "status": "pending",
- "report_link": "string",
- "emails_sent": [
- "string"
], - "generated_at": "2019-08-24T14:15:22Z",
- "error_message": "string",
- "error_at": "2019-08-24T14:15:22Z"
}