---
title: "Set the master device"
method: PUT
path: "/api/apps/fleet/{installation_id}/master"
tags: ["Apps - Fleet"]
---

# Set the master device

`PUT /api/apps/fleet/{installation_id}/master`

## Request

- Base URL: `https://trmnl.com`
- URL: `https://trmnl.com/api/apps/fleet/{installation_id}/master`
- Auth: HTTP bearer

The device whose playlist and settings the mirrors copy. A mirror of this fleet is promoted; the previous master leaves the fleet.

## Request body

- object
  - `device_id` integer, required

## Response `200`

Set

- object
  - `data` Fleet
    - `id` string, uuid
    - `name` string
    - `master` FleetMember
      - `device_id` integer
      - `name` string, nullable
      - `role` 'master' | 'mirror'
      - `check_in_state` 'overdue' | 'on_time' | 'asleep' | 'never_seen', nullable: Whether the device checked in when it said it would; null for a device that was reset
      - `expected_check_in_at` string, date_time, nullable
      - `last_pushed_at` string, date_time, nullable
      - `in_sync` boolean: Pushed since the master playlist last changed
    - `mirror_count` integer
    - `needs_push_count` integer: Mirrors not pushed since the master playlist last changed
    - `overdue_count` integer
    - `last_pushed_at` string, date_time, nullable
    - `inherited_settings` string[]: Master settings each push copies to the mirrors
    - `alerts` object
      - `enabled` boolean
      - `threshold_minutes` integer
      - `email` string, nullable

## Other responses

- `401`: Unauthorized
- `404`: Device belongs to another user
- `422`: The device is in another fleet

---

[API](https://skmtc.dev/trmnl/apis/trmnl-api.md) · [All operations](https://skmtc.dev/trmnl/apis/trmnl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trmnl/apis/trmnl-api/revisions/66179e6d663b?raw)
