Sensors
The Sensor object
idstringoptionalPublic sensor identifier.
namestringoptionalSensor name.
typestringoptionalSensor type.
devicestringoptionalDevice public ID, when loaded.
unitstringoptionalMeasurement unit.
last_valuestringoptionalLatest recorded value.
threshold_statusstringoptionalDerived threshold status.
statusstringoptionalSensor status.
metaobjectoptionalAdditional sensor metadata.
{
"id": "sensor_2Qx9KpL7Vz",
"name": "Cargo Temperature",
"type": "temperature",
"unit": "celsius",
"last_value": "4.2",
"status": "active",
"threshold_status": "normal",
"updated_at": "2026-05-07T08:30:00.000000Z",
"created_at": "2026-05-07T08:30:00.000000Z"
}/v1/sensorsCreate a Sensor
Create a sensor.
namestringoptionalSensor name.
typestringoptionalSensor type.
devicestringoptionalDevice public ID.
telematicstringoptionalTelematic public ID.
unitstringoptionalMeasurement unit.
min_thresholdnumberoptionalMinimum threshold.
max_thresholdnumberoptionalMaximum threshold.
sensorable_typestringoptionalAttachable resource type.
sensorablestringoptionalAttachable resource public ID.
/v1/sensorscurl -X POST https://api.fleetbase.io/v1/sensors \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"name": "Cargo Temperature",
"type": "temperature",
"device": "{{device_id}}",
"unit": "celsius",
"status": "active",
"min_threshold": 0,
"max_threshold": 8
}'{
"id": "<string>",
"object": "sensors"
}/v1/sensorsQuery Sensors
Query sensors.
querystringoptionalSearch query for sensors.
limitintegeroptionalMaximum number of records to return.
pageintegeroptionalPage number for paginated results.
sortstringoptionalSort expression, such as -created_at.
typestringoptionalFilter by sensor type.
statusstringoptionalFilter by sensor status.
devicestringoptionalFilter by device public ID or internal ID.
/v1/sensorscurl https://api.fleetbase.io/v1/sensors \
-H "Authorization: Bearer flb_live_…"{
"id": "<string>",
"object": "sensors"
}/v1/sensorsRetrieve a Sensor
Retrieve a sensor.
/v1/sensorscurl https://api.fleetbase.io/v1/sensors \
-H "Authorization: Bearer flb_live_…"{
"id": "<string>",
"object": "sensors"
}/v1/sensorsUpdate a Sensor
Update a sensor.
namestringoptionalSensor name.
typestringoptionalSensor type.
devicestringoptionalDevice public ID.
telematicstringoptionalTelematic public ID.
unitstringoptionalMeasurement unit.
min_thresholdnumberoptionalMinimum threshold.
max_thresholdnumberoptionalMaximum threshold.
sensorable_typestringoptionalAttachable resource type.
sensorablestringoptionalAttachable resource public ID.
/v1/sensorscurl -X PUT https://api.fleetbase.io/v1/sensors \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"last_value": "4.2",
"last_reading_at": "2026-05-07T08:30:00Z"
}'{
"id": "<string>",
"object": "sensors"
}/v1/sensorsDelete a Sensor
Delete a sensor.
/v1/sensorscurl -X DELETE https://api.fleetbase.io/v1/sensors \
-H "Authorization: Bearer flb_live_…"{
"id": "<string>",
"deleted": true
}