Add a device to your Reeftank
The Reef Assistant Public API is designed to enable external devices and tech-savvy users to seamlessly add data to the Reef Assistant logbook. This allows for easy integration of additional device data, such as readings from the Reefbot Lab or similar equipment.
🔗 Endpoint
POST https://reefassistant.io/api/public/logbook/add
🔐 Authentication
Authentication is based on a personal access token linked to a specific reef tank.
"auth": {
"tank_id": "UUID",
"token": "TOKEN"
}
| Field | Type | Description |
|---|---|---|
tank_id | UUID | The reef tank's unique identifier |
token | String | Personal access token for the user |
📦 Request Body (JSON)
{
"auth": {
"tank_id": "4ba3fe75-169c-4a1a-91d0-2f9ecd3b2fcf",
"token": "1152|abc123..."
},
"data": {
"element": "alk",
"value": 8.5,
"unit": "dkh",
"added_at": "28.07.2025 11:15",
"timezone": "Europe/Berlin"
},
"device": {
"device_name": "Public API",
"device_manufacturer": "fynix GmbH",
"device_model": "pub_api",
"device_hardware_version": "1.0.0",
"device_software_version": "1.0.1"
}
}
🧪 Field Descriptions
🔹 data
| Field | Type | Required | Description |
|---|---|---|---|
element | String | ✅ | Element name (e.g. alk, po4, ca, ...) |
value | Float | ✅ | Measured value |
unit | String | ✅ | Measurement unit (must match matrix definition) |
added_at | String | ✅ | Timestamp when the value was measured |
timezone | String | ✅ | Timezone (e.g. Europe/Berlin, UTC) |
🔹 device (optional)
| Field | Type | Description |
|---|---|---|
device_name | String | Device name |
device_manufacturer | String | Manufacturer |
device_model | String | Model name |
device_hardware_version | String | Hardware version |
device_software_version | String | Software version |
✅ Success Response
{
"message": "success, record created.",
"entry_id": 1234
}
⚠️ Error Responses
| Status | Meaning |
|---|---|
| 400 | Invalid data or outside matrix range |
| 401 | Invalid or expired token |
| 403 | Access denied for given tank |
| 404 | Tank or matrix not found |
🌡️ Supported Elements
alk, salinity, ph, po4, no3, ca, mg, temp,
b, br, cl, k, na, sr, so4, s, sac254,
ba, cr, co, fe, f, i, cu, li, mn, mo,
ni, se, v, zn, sn, cs, no2, p, po4s, si
⚙️ Supported Units
| Code | Display Value |
|---|---|
ml | ml |
mg_l | mg/L |
ug_l | µg/L |
dkh | °dKH |
mol_l | mol/L |
celsius | °C |
psu | PSU |
g | g |
m-1 | m-1 |
g_cm3 | Dichte g/cm³ |
ms_cm | mS/cm |
meq_l | mEq/L |
ppm | ppm |
p_ug_l | Phosphor µg/L |
mu | m-u |
📚 Example: cURL Request
curl -X POST https://reefassistant.io/api/public/logbook/add \
-H "Content-Type: application/json" \
-d '{
"auth": {
"tank_id": "abc-def-uuid",
"token": "1152|abc..."
},
"data": {
"element": "alk",
"value": 7.3,
"unit": "dkh",
"added_at": "28.07.2025 11:15",
"timezone": "Europe/Berlin"
},
"device": {
"device_name": "ReefBot",
"device_manufacturer": "ReefCorp",
"device_model": "RB-X1",
"device_hardware_version": "2.0.1",
"device_software_version": "5.4.3"
}
}'
💡 Notes
- The timestamp (
added_at) is parsed in the provided timezone and converted to UTC internally. - Values outside of the configured min/max range (per element in your tank matrix) will be rejected.
- Units must match the matrix definition for the selected element.
✉️ Questions? Contact us at support@reefassistant.io