The options for the Airthings client, primarily client credentials
Create an Airthings Client ID & Secret at https://consumer-api-doc.airthings.com/dashboard
List all accounts the current user is member of
Lists all accounts the current user is member of. The data returned by this endpoint changes when a user is added or removed from business accounts. It is safe to assume that the accountId remains constant for Consumer users. The accountId returned by this endpoint is used to fetch the devices and sensors from the other endpoints.
AirthingsError If the request fails
Get all devices connected to a user
List all devices (and their sensor abilities) connected to a user’s account. The data returned by this endpoint changes when a device is registered, unregistered or renamed.
AirthingsError If the request fails
Get sensors for a set of devices
The units type sensor values will be returned in, metric or imperial
Optionalsn: string[]An optional list of serial numbers to filter the results
Get sensors for a set of devices. The response will contain the latest sensor values for the devices. The sensor values are updated depending on the device types sampling rate. It is recommended to poll the API at a regular interval to get the latest sensor values. The response will be paginated with a maximum of 50 records per page.
AirthingsError If the request fails
Get the remote control state of a Renew device
The serial number of the device
The last reported operational mode of a Renew (AP_1) air purifier. The state reflects what the device last reported, not necessarily the command last sent. If the device has never synced a mode, a 404 error is returned.
AirthingsError If the request fails
Set the remote control mode of a Renew device
The serial number of the device
The desired operational mode and optional fan speed
Set the operational mode of a Renew (AP_1) air purifier. Available modes are OFF, AUTO, SLEEP, BOOST, and MANUAL. Fan speed (1-5) is required for MANUAL mode. The command is forwarded to the device asynchronously. Use getRemoteControl to confirm the device has applied the new mode.
AirthingsError If the request fails
Get rate limit metrics from the last getSensors request
Current rate limit metrics reflecting the X-RateLimit-Limit,
X-RateLimit-Remaining, and X-RateLimit-Reset response headers from
the most recent getSensors call. Before any getSensors
call has been made, all rate limit metrics are initialised to -1.
The Airthings for Consumer API provides secure and authorized access for Airthings consumers to retrieve the latest data from their Airthings air quality monitors. Leveraging HTTPS and OAuth for enhanced security, this API empowers users to seamlessly access real-time information from their Airthings devices, gaining valuable insights into the air quality within their environments.