Skip to main content
PUT
/
schedules
/
{scheduleId}
Update a schedule
curl --request PUT \
  --url https://api.example.com/schedules/{scheduleId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "deviceId": "device_abc123",
  "recurrence": {
    "type": "daily"
  },
  "slots": [
    {
      "time": "06:00",
      "action": {
        "action": "set_operation_mode",
        "mode": "charge"
      }
    }
  ],
  "startAt": "2025-03-20T00:00:00Z",
  "exclusions": {
    "days": [
      "06",
      "07"
    ],
    "dates": [
      {
        "start": "2025-04-01",
        "end": "2025-04-03"
      }
    ]
  },
  "finishAt": "2025-06-20T00:00:00Z"
}
'
{
  "id": "sched_abc123",
  "deviceId": "device_abc123",
  "deviceType": "battery",
  "status": "active",
  "recurrence": {
    "type": "daily"
  },
  "slots": [
    {
      "time": "06:00",
      "action": {
        "action": "set_operation_mode",
        "mode": "charge"
      }
    }
  ],
  "exclusions": {
    "days": [
      "06",
      "07"
    ],
    "dates": [
      {
        "start": "2025-04-01",
        "end": "2025-04-03"
      }
    ]
  },
  "startAt": "2025-03-20T00:00:00Z",
  "finishAt": "2025-06-20T00:00:00Z",
  "createdAt": "2025-03-17T10:30:00Z",
  "updatedAt": "2025-03-17T10:30:00Z"
}
Coming Soon

Authorizations

x-api-key
string
header
required

Path Parameters

scheduleId
string
required

The unique identifier for the schedule

Example:

"sched_abc123"

Body

application/json

The full schedule replacement

deviceId
string
required

The device to schedule actions against

Example:

"device_abc123"

recurrence
object
required

Recurrence pattern for the schedule. Currently only 'daily' is supported.

slots
object[]
required

Array of time-of-day action slots. Executed daily in chronological order within the schedule window.

Minimum array length: 1
startAt
string<date-time>
required

ISO 8601 UTC timestamp for when the schedule becomes active

Example:

"2025-03-20T00:00:00Z"

exclusions
object

Exclusion rules for the schedule. Both fields are optional and additive — any day matching either rule is skipped.

finishAt
string<date-time> | null

ISO 8601 UTC timestamp for when the schedule ends. Null for an indefinite schedule.

Example:

"2025-06-20T00:00:00Z"

Response

Schedule updated successfully

id
string
required

Unique schedule identifier

Example:

"sched_abc123"

deviceId
string
required

Target device ID

Example:

"device_abc123"

deviceType
enum<string>
required

Resolved device type

Available options:
battery,
hvac,
ev-charger,
solar-inverter,
vehicle
Example:

"battery"

status
enum<string>
required

Current status of the schedule

Available options:
active,
paused,
completed,
cancelled
Example:

"active"

recurrence
object
required

Recurrence pattern for the schedule. Currently only 'daily' is supported.

slots
object[]
required
exclusions
object
required

Exclusion rules for the schedule. Both fields are optional and additive — any day matching either rule is skipped.

startAt
string<date-time>
required
Example:

"2025-03-20T00:00:00Z"

finishAt
string<date-time> | null
required
Example:

"2025-06-20T00:00:00Z"

createdAt
string<date-time>
required
Example:

"2025-03-17T10:30:00Z"

updatedAt
string<date-time>
required
Example:

"2025-03-17T10:30:00Z"