Enable or disable a sub-device
Disabling a sub-device stops the master from accepting further commands for it (any command/command/on/command/off request targeting a disabled sub-device 404s), it does not remove it - state, telemetry history and its declared capabilities stay intact and it can be re-enabled at any time. Requires the same grant a command against this sub-device would need. Body is optional - omit it to flip the current state, or pass enabled explicitly.
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
curl -X PATCH "https://example.com/api/v1/devices/dev_a1b2c3/sub-devices/sub_x1y2z3/toggle" \ -H "Content-Type: application/json" \ -d '{ "enabled": false }'{ "ok": true, "enabled": false, "message": "Sub-device disconnected"}Update a schedule slot PUT
Only the fields provided are changed, everything else on the existing schedule stays as-is.
List the sub-devices connected behind this device GET
A device can act as an orchestrator ("master") for other physical devices connected to it locally (Bluetooth, WiFi) rather than directly to Nexalware - this lists everything reported behind it. Empty until the master actually reports a sub-device, see the [Device Orchestration](/docs/device-orchestration) docs for how a master does that. See [Receiving Webhooks](/docs/reference/receiving-webhooks) for the equivalent live-event story, sub-device events ride the same WebSocket feed and webhook pipeline device events already use.