Skip to main content
POST
Optimize by state of charge

Authorizations

Authorization
string
header
required

Bearer token obtained from POST /auth/tokens.

Path Parameters

device_id
string
required

Flatpeak Device ID.

Example:

"dev_63a6087272941ef077a8fd3e"

Body

application/json
storm_mode_enabled
boolean

Overrides the device's storm_mode_enabled setting for this request only. Omit to use the setting from the latest device state.

Example:

false

Response

Optimization by state of charge response.

id
string
required

Flatpeak Optimization ID.

Example:

"opt_65ea3fb185c1541f247c251e"

object
enum<string>
required

Object type.

Available options:
optimization_soc
Example:

"optimization_soc"

live_mode
boolean
required

true for live data, false for test data.

Example:

true

device_id
string
required

Flatpeak Device ID.

Example:

"dev_6563a6757360a6d6a628e839"

location_id
string
required

Flatpeak Location ID.

Example:

"loc_641b90b758fb8e6293716e40"

timezone
string
required

Timezone at the location, tz database name such as Europe/Berlin.

Example:

"Europe/London"

currency_code
string
required

Currency of the cost values. Amounts are in large currency units.

Pattern: ^[A-Z]{3}$
Example:

"GBP"

data
OptimizationData · object[]
required

The price windows of the optimization, in time order.

account_id
string
required

Flatpeak Account ID.

Example:

"acc_661677911f2197045e6cf1b1"

time_created
string<date-time>
required

Time when this object was created, in UTC.

Example:

"2026-01-24T14:15:22Z"