AirBox Ingest API
Send your air-quality sensor readings to AirBox. This page is a quick how-to; the full reference lives in the documentation linked at the bottom.
How to submit
Send an HTTP POST request to:
POST https://ingest.airbox.alacrity.ro/api/v2/submit
with header Content-Type: application/json and your API key supplied in
any one of these three headers:
Authorization: ApiKey <key>ApiKey: <key>X-ApiKey: <key>
Request body
A single JSON object. Required fields:
| Field | Type | Notes |
|---|---|---|
geohash required | string | ≤ 100 characters |
charge required | float | 0–100 |
sun required | boolean | true / false |
geohash may be omitted if your installation has a
server-side geohash override configured — the override then pins
the station's location and supplies the geohash for every reading.
Optional numeric fields — omit any your sensor does not measure:
co2,pm1,pm25,pm4,pm10temp,humvoc_index,nox_index,voc,noxvoc_raw,nox_raw— raw SGP41 ticks, integers0–65535
Raw gas ticks (voc_raw / nox_raw)
Some SEN66 units report the SGP41 gas sensor as raw ticks rather than a
finished index. Send those as voc_raw / nox_raw (integers
0–65535) and the server converts them to voc_index /
nox_index for you, using a stateful algorithm that warms up over the first
~45 seconds of a device's readings (the index reads 0 until then).
Raw and index are mutually exclusive per gas: if you send an explicit
voc_index it wins and any voc_raw in the same payload is ignored
(likewise nox_index vs nox_raw). Values outside
0–65535 are rejected with HTTP 400.
Rules: string fields are limited to 100 characters, no extra fields are allowed, and invalid payloads are dropped with HTTP 400.
Example
curl -X POST https://ingest.airbox.alacrity.ro/api/v2/submit \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey <your-key>" \
-d '{"geohash":"u0nzj8","charge":87.5,"sun":true,"pm25":12.3,"temp":21.4,"hum":48.0}'