How to move devices from account to subaccount?

An API method to change the owner of the registered flespi device.

You often start with a Free account or a default account in your Commercial plan. Later on, you may want to group your devices by project, by customer, by manager, etc. Flespi offers subaccounts to organize such grouping. Now you need to move the already created devices from the parent account to a subaccount.

You need the following method for that:  https://flespi.io/docs/#/gw/devices/put_devices_dev_selector_cid.

Just specify the ids of devices you need to move and the cid of the subaccount to move them to.

move flespi device from account to subaccount

You can copy the curl to execute from the terminal or execute the request right in the documentation (beware — it will perform the actual moving). 

Important requirements

  • The device must not be moved/created within the last 60 seconds.

  • If the device is assigned to a calculator, the new account must have access to this calculator.

  • If the device is assigned to a stream, the new account must have access to this stream.

  • If the device is assigned to a plugin, the new account must have access to this plugin.

  • There should be no MQTT state topic (flespi/state/gw/devices/{device-id}/…) related to the device with a timestamp of more than 60 seconds from the present (especially actual for telemetry values).

Moving devices in UI

flespi panel also features the functionality to move devices between accounts:

flespi panel move devices from account to subaccount

  1. use Ctrl+click to select the desired devices
  2. click on the purple "Move to subaccount" button
  3. select the target subaccount from the drop-down list and click Move 

Moving channels

You can also move channels from account to subaccount using the following request method: https://flespi.io/docs/#/gw/channels/put_channels_ch_selector_cid.


See also
A detailed explanation of what we charge for, when, and on what conditions.
Manually posting messages into a flespi device.