API Access
What it is​
The AirSmart API is the same engine that powers the app and the Web Portal, opened up for you to build on. It's a plain old REST API — JSON over HTTPS — so you can call it from just about anything: a Python script, a Google Sheet, a Power BI report, a Lambda, or your own product.
The base URL is:
Getting in​
Access is tied to your Monkeytronics account, so nobody can read your data but you. Authentication is handled by AWS Cognito: you exchange your account credentials for a short-lived token, then send that token with each request. It sounds fiddly, but the official Cognito libraries do all the work — in Node it's literally amazon-cognito-identity-js to get the token and axios to make the call.
To get you started we'll hand you a small sample project that authenticates and makes its first call in about a dozen lines. The shape of it is no secret:
- Authenticate with your credentials → get a token.
- Put the token in the
Authorizationheader. - Call an endpoint, e.g.
GET /devices/all, and you're away.
tip
We don't publish the sample code here (it carries account-specific config), but ask and we'll send it over. Once you've seen it work once, the rest of the API is just more of the same.
What you can do with it​
- List your fleet — every device on your account, with its name, location and project settings (room, building, group and so on).
- Read the latest — the current temperature, humidity, CO₂ and any other measurements a device supports.
- Pull history — time-series data over whatever window you need, ready to drop into a chart or a model.
It's a read-first API designed around the way people actually use the data — dashboards, reports, research pipelines, and the occasional "is the office stuffy again?" Slack bot.
A note on adding devices​
One thing the API deliberately can't do is register a brand-new monitor to your account — that still has to happen in the app, because it relies on scanning the device's QR code and a Bluetooth handshake. Everything after a device is on your account, though, is fair game.
Get set up​
Email support@monkeytronics.co.nz, tell us what you're building, and we'll issue your API credentials and send the sample project. If you'd rather not poll at all and just want the data to arrive on its own, take a look at Live Data Streaming.