curl --request PATCH \
--url https://energy-api.flatpeak.com/devices/{device_id}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"battery": {
"backup_reserve_percent": 30
}
}
'{
"object": "device_settings",
"device_id": "dev_63a6087272941ef077a8fd3e",
"supported": [
"battery.backup_reserve_percent",
"battery.strategy",
"battery.storm_mode_enabled",
"battery.export_rule",
"battery.charge_from_grid_enabled",
"battery.one_off_charge"
],
"battery": {
"backup_reserve_percent": 20,
"strategy": "SELF_POWER",
"storm_mode_enabled": true,
"export_rule": "BATTERY_OK",
"charge_from_grid_enabled": true,
"one_off_charge": false
},
"sync_status": "IN_SYNC",
"updated_by": "OEM",
"time_updated": "2026-08-31T09:12:44Z",
"account_id": "acc_661677911f2197045e6cf1b1"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Update device settings
Updates the device’s desired settings. Send only the fields that change; when two writes change the same field, the last one wins. Unsupported field paths return 422 setting_not_supported. The change is delivered as device.settings.update; confirm it through your next device state submission. When a one-off charge ends, write one_off_charge false.
curl --request PATCH \
--url https://energy-api.flatpeak.com/devices/{device_id}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"battery": {
"backup_reserve_percent": 30
}
}
'{
"object": "device_settings",
"device_id": "dev_63a6087272941ef077a8fd3e",
"supported": [
"battery.backup_reserve_percent",
"battery.strategy",
"battery.storm_mode_enabled",
"battery.export_rule",
"battery.charge_from_grid_enabled",
"battery.one_off_charge"
],
"battery": {
"backup_reserve_percent": 20,
"strategy": "SELF_POWER",
"storm_mode_enabled": true,
"export_rule": "BATTERY_OK",
"charge_from_grid_enabled": true,
"one_off_charge": false
},
"sync_status": "IN_SYNC",
"updated_by": "OEM",
"time_updated": "2026-08-31T09:12:44Z",
"account_id": "acc_661677911f2197045e6cf1b1"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Body
Partial update of the device's desired operating settings. Send only the fields that change, nested under their namespace. When two writes change the same field, the last one wins.
Response
Device settings record.
The device's desired settings, one record shared between you and its VPP operator. Device-local changes are reconciled in from your state submissions. supported lists the writable field paths; writes outside it return 422. Only the blocks for subsystems the device has are returned.
The field paths that can be written for this device, derived from its type and capabilities. Recomputed on a capabilities update. Empty for device types without settings.
[
"battery.backup_reserve_percent",
"battery.strategy",
"battery.storm_mode_enabled",
"battery.export_rule",
"battery.charge_from_grid_enabled",
"battery.one_off_charge"
]
Whether the device has applied the desired settings, from comparing this record with reported state. Numeric fields compare within a tolerance. A null desired value is in sync only with a null reported value. one_off_charge is not compared, because device state does not report it. FAILED fires device.settings.sync_failed.
IN_SYNC, PENDING, FAILED "IN_SYNC"
Was this page helpful?

