Updates or creates a configuration property on a device owned by the authenticated user. Properties are key-value pairs (both stored as strings) that configure device behavior such as automation thresholds and hardware capabilities. Each update is recorded in the device’s log as aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GaelCeballos/Smart_Enviro_Backend/llms.txt
Use this file to discover all available pages before exploring further.
COMMAND entry.
Endpoint
| Field | Value |
|---|---|
| Method | PUT |
| Path | /api/my-devices/{id}/properties |
| Auth | Bearer token required (Authorization: Bearer YOUR_TOKEN) |
Path Parameters
The unique ID of the device to configure. The device must belong to the authenticated user.
Request Body
The name of the property to create or update (e.g.
"humidity_threshold", "auto_water"). Must be a non-empty string.The new value for the property. Always provided as a string, even for boolean or numeric values (e.g.
"true", "45").Common Property Keys
| Key | Example Value | Description |
|---|---|---|
auto_water | "true" | Enable automatic watering when humidity drops below threshold |
humidity_threshold | "45" | Humidity percentage that triggers the auto_water pump |
has_pump | "true" | Indicates the device has a pump actuator |
has_humidity | "true" | Indicates the device has a soil humidity sensor |
has_light | "false" | Indicates the device has a light sensor |
Request Example
Responses
200 OK
The property was created or updated successfully. ACOMMAND log entry is written to device_logs capturing which key was changed and its new value.
Always
"success" on a 200 response.Confirmation that the configuration was saved. The message text is returned verbatim from the controller.
404 Not Found
The device does not exist or does not belong to the authenticated user.422 Unprocessable Entity
One or both required fields (property_key, property_value) are missing or not strings.