POST/api/apps/fleet/{installation_id}/devices

Add a device to a fleet as a mirror

Adds a device to a fleet as a mirror. A device can belong to only one fleet at a time. Use PUT /api/apps/fleet/{installation_id}/master to promote a device to master.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
installation_idstringrequired
The identifier of the fleet installation to add the device to.

The device to add to the fleet as a mirror.

device_idintegerrequired
The integer identifier of the device to add.

4 status codes
200Returns the added device's fleet data, including its identifier, name, role, check-in state, and sync status.
dataobjectoptional
401Returned when the request is unauthorized.
errorstringoptional
404Returned when the device belongs to another user.
422Returned when the device is already in a fleet.

Error handling

A 401 is returned when the request is unauthorized. A 404 is returned when the device belongs to another user. A 422 is returned when the device is already in a fleet. The installation_id path parameter must identify the fleet installation, and the body must include device_id as an integer.