Download OpenAPI specification:
API for ClimaSense IoT devices to report telemetry, receive commands, and manage firmware updates.
All endpoints require API key authentication via the Authorization header:
Authorization: Bearer <api_key>
API keys are provisioned during device manufacturing and stored hashed on the server.
| Endpoint | Limit | Window |
|---|---|---|
POST /v1/telemetry |
60 requests | 1 minute |
GET /v1/settings |
10 requests | 1 minute |
GET /v1/commands/pending |
30 requests | 1 minute |
GET /v1/ota/check |
10 requests | 1 minute |
GET /v1/ota/download/* |
5 requests | 1 hour |
Submit one or more sensor readings from the device. Readings are stored in TimescaleDB and routed to the alert evaluation system.
Sensor Types:
temperature (°C)humidity (%)pressure (hPa)power_availability (boolean as 0/1)battery_level (%)signal_strength (dBm)iaq (Indoor Air Quality index)required | Array of objects (SensorReading) [ 1 .. 100 ] items |
{- "readings": [
- {
- "sensor_type": "temperature",
- "value": 23.5,
- "timestamp": "2026-03-29T12:00:00Z"
}, - {
- "sensor_type": "humidity",
- "value": 45.2,
- "timestamp": "2026-03-29T12:00:00Z"
}, - {
- "sensor_type": "battery_level",
- "value": 87,
- "timestamp": "2026-03-29T12:00:00Z"
}
]
}{- "accepted": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}Retrieve the current configuration for this device. Configuration includes reporting intervals, enabled sensors, and other device-specific settings.
{- "reporting_interval_seconds": 60,
- "enabled_sensors": [
- "string"
], - "location": {
- "latitude": -90,
- "longitude": -180,
- "name": "Marina Berth 12"
}, - "timezone": "America/Los_Angeles"
}Update device configuration. Supports partial updates - only include fields that should be changed.
| reporting_interval_seconds | integer [ 60 .. 3600 ] |
| enabled_sensors | Array of strings |
object (Location) | |
| timezone | string |
{- "reporting_interval_seconds": 60,
- "enabled_sensors": [
- "string"
], - "location": {
- "latitude": -90,
- "longitude": -180,
- "name": "Marina Berth 12"
}, - "timezone": "string"
}{- "reporting_interval_seconds": 60,
- "enabled_sensors": [
- "string"
], - "location": {
- "latitude": -90,
- "longitude": -180,
- "name": "Marina Berth 12"
}, - "timezone": "America/Los_Angeles"
}Check for pending commands that need to be executed. Commands expire after 24 hours if not acknowledged.
Command Types:
reboot - Graceful device restartconfig_update - Configuration changefactory_reset - Full device reset (requires explicit confirmation)diagnostics - Report diagnostic information{- "commands": [
- {
- "command_id": "cmd-001",
- "type": "reboot",
- "payload": {
- "delay_seconds": 5
}, - "expires_at": "2026-03-30T12:00:00Z"
}
]
}Report the result of a command execution. The device should call this after attempting to execute a command, regardless of success or failure.
| command_id required | string <uuid> |
| status required | string Enum: "acked" "failed" |
| error_message | string Error details if status is failed |
object Command result data (e.g., diagnostics output) |
{- "command_id": "7d510d78-7444-4252-aeac-9e473949661e",
- "status": "acked",
- "error_message": "string",
- "result": { }
}{- "acknowledged": true,
- "timestamp": "2019-08-24T14:15:22Z"
}Check if a firmware update is available for this device. Updates are released per-batch to enable staged rollouts.
| current_version required | string Example: current_version=1.2.3 Current firmware version on the device |
{- "update_available": true,
- "version": "1.3.0",
- "checksum": "sha256:a3f8c2e1d4b5...",
- "size_bytes": 1048576,
- "release_notes": "Bug fixes and performance improvements"
}Stream the firmware binary for the specified version from R2 storage. Verify the checksum after download before applying.
| version required | string Example: 1.3.0 Firmware version to download |
{- "error": "unauthorized",
- "message": "Invalid or missing API key"
}Report the status of an OTA update. The device should report progress during download and the final result after attempting to apply the update.
| version required | string Firmware version being updated to |
| status required | string Enum: "downloading" "downloaded" "verifying" "applying" "completed" "failed" |
| progress_percent | integer [ 0 .. 100 ] Download progress (for downloading status) |
| error_message | string Error details if status is failed |
{- "version": "string",
- "status": "downloading",
- "progress_percent": 100,
- "error_message": "string"
}{- "recorded": true,
- "timestamp": "2019-08-24T14:15:22Z"
}