Create or replace a schedule slot
A device has up to 5 slots (0-4). onCommand/offCommand default to plain ON/OFF; any other command still fires reliably from the server at the scheduled time, but only the plain ON/OFF case also syncs to firmware for offline self-execution. An API key needs a DeviceGrant covering both commands used, exactly like sending them directly with POST .../command.
A session token for an existing account, obtained from POST /auth/login (see the Authentication endpoints) - not an API key. Endpoints marked with this scheme reject API key callers outright, regardless of what that key is granted. Outside the Authentication endpoints themselves, everything requiring this scheme manages dashboard resources (rules, grants, keys, device configuration, command catalogs) and mirrors what a human does in the Nexalware web app - it is not meant to be automated by a third-party integration the way the Device Control and Schedules endpoints are.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/devices/dev_a1b2c3/schedules" \ -H "Content-Type: application/json" \ -d '{ "slot": 0, "onTs": 1732003600, "offTs": 1732032400, "label": "Morning" }'{ "scheduleId": "sched_a1b2c3", "deviceId": "dev_a1b2c3", "slot": 0, "onTs": 1732003600, "offTs": 1732032400, "label": "Morning", "enabled": true, "status": "PENDING", "onCommand": { "command": "ON" }, "offCommand": { "command": "OFF" }}Cancel a schedule slot DELETE
Previous Page
Get the command choices available for scheduling GET
The same command catalog GET /devices/{deviceId}/commands returns, filtered to commands a schedule can actually use (kind ACTION only, a schedule can't "run" a QUERY command). Use this to populate a command picker before calling POST .../schedules.