TRMNL device setup
Called by TRMNL firmware on first boot. The device presents its MAC in the ID header; the server responds with an api_key (used as Access-Token on every subsequent call), a 6-char friendly_id, the URL of the device’s first image, and a suggested filename for local caching.
If the MAC has never been seen, an unclaimed :class:BYOSDevice row is created — the device starts in the unclaimed state and renders the BYOS fallback image until an operator links it to an organization.
Auth: unauthenticated. The TRMNL firmware doesn’t have an Access-Token yet at this call.
200— setup succeeded; device may begin polling/api/display.400— theIDheader is missing or not a 12-char hex MAC.
Response
OK
Response to GET /api/setup/.
The TRMNL firmware persists api_key to flash and uses it on every
subsequent call. image_url is the first image to paint — for an
unclaimed device this is the fallback "register me" screen.
Opaque per-device access token. Firmware stores this in flash and sends it in the Access-Token header on every subsequent call.
Short 6-character human-readable device label (e.g. A1B2C3). Shown on the panel during first-boot and used in dashboard URLs.
Absolute URL the device should fetch to paint its first image. For an unclaimed device this points to the BYOS fallback image.
Suggested filename for the device to use when caching the fetched image locally.
Optional human-readable message — currently always empty on success. Future: post-firmware-update notes.
TRMNL setup status code. Always 200 on success; 404 on devices that should refuse to operate (currently unused).