---
title: "Update a device"
method: PATCH
path: "/api/devices/{id}"
tags: ["Devices"]
---

# Update a device

`PATCH /api/devices/{id}`

## Request

- Base URL: `https://trmnl.com`
- URL: `https://trmnl.com/api/devices/{id}`
- Auth: HTTP bearer

The same settings as the device page. Keys the device cannot take (custom dimensions on a fixed-size model, appearance on a native device) are dropped; a native device can only switch between the OG models.

## Request body

- object
  - `name` string
  - `refresh_interval` integer: Seconds between check-ins, 300 to 86400
  - `orientation` integer
  - `sleep_mode_enabled` boolean
  - `sleep_screen_enabled` boolean
  - `sleep_start_time` integer: Minutes after midnight, 0 to 1439
  - `sleep_end_time` integer: Minutes after midnight, 0 to 1439
  - `sleep_until` string, nullable: Sleep once, from the next check-in until this ISO 8601 time (at most a year out); no offset means the account time zone, null cancels. Any later check-in, such as a button press, wakes the device
  - `ota_enabled` boolean
  - `low_battery_notification_enabled` boolean
  - `low_battery_notification_email` string, nullable
  - `low_battery_screen_disabled` boolean
  - `percent_charged` number
  - `visibility` 'standalone' | 'sharable'
  - `model_id` integer: listModels; a BYOD device can take any model
  - `firmware_channel` 'development' | 'test' | 'staging' | 'production'
  - `special_function` string, nullable
  - `touchbar_mode` 'tap' | 'swipe'
  - `temperature_profile` 'default' | 'a' | 'b'
  - `waits_for_next_render` boolean
  - `refreshing_screen_disabled` boolean
  - `maximum_compatibility` boolean
  - `guest_mode_item_id` integer, nullable
  - `guest_mode_item_duration` integer, nullable
  - `palette_id` string: listPalettes
  - `font_family` string
  - `text_scale` 'small' | 'regular' | 'large' | 'xlarge'
  - `theme` string
  - `auto_advance` boolean: Beta: may change or go away. false keeps the current screen until a button press; taken only when management.writable_fields lists it
  - `playlist_item_ttl` 24 | 48 | 72 | 96 | 120 | 144 | 168, nullable: Hours a playlist item can go without a new screen before it is skipped; null never skips
  - `custom_width` integer: byod_custom model only
  - `custom_height` integer: byod_custom model only
  - `custom_format` string: byod_custom model only
  - `framework_size` 'sm' | 'md' | 'lg': byod_custom model only
  - `maximum_image_bytes` integer: byod_custom model only
  - `dither_pixel_ratio` number: byod_custom model only
  - `scale_factor` number: BYOD only
  - `ui_scale` number: BYOD only
  - `rotate` integer

## Response `200`

Updated

- object
  - `data` Device
    - `management` object
    - `id` integer
    - `name` string
    - `friendly_id` string
    - `mac_address` string: All but the last two bytes are masked for an API key or an agent; the account API key reads it whole.
    - `firmware_version` string, nullable: Version the device reported at its last check-in
    - `firmware_channel` string: Release channel the device follows
    - `ota_enabled` boolean: Whether the device accepts over-the-air updates
    - `pinned_firmware_version` string, nullable: Version the device is pinned to, if any
    - `battery_voltage` number, nullable
    - `rssi` integer, nullable
    - `wifi_band` string, nullable: WiFi band the device is connected on ("2.4" or "5")
    - `refresh_interval` integer: Seconds between check-ins, 300 to 86400
    - `orientation` integer
    - `sleep_screen_enabled` boolean
    - `low_battery_notification_enabled` boolean
    - `auto_advance` boolean: Beta: may change or go away. Present only when management.writable_fields lists it
    - `sleep_mode_enabled` boolean
    - `sleep_start_time` integer
    - `sleep_end_time` integer
    - `sleep_until` string, date_time, nullable: A one-time sleep the device takes at its next check-in, then clears
    - `last_ping_at` string, date_time, nullable
    - `hardware_last_ping_at` string, date_time, nullable
    - `percent_charged` number
    - `wifi_strength` number
    - `mashup_layouts` object: The mashup layouts the device can show and the positions to fill in each; 3x3 lists none because its grid_config names them

## Other responses

- `401`: Unauthorized
- `422`: Unprocessable Entity
- `429`: An appearance change renders every playlist item again, past the hourly render allowance

---

[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)
