Update user appearance settings
CoderSessionTokenCoder-Session-Token<token>user*stringUser ID, name, or me
New appearance settings
application/json- body
terminal_font*codersdk.TerminalFontName"""geist-mono""ibm-plex-mono""fira-code""source-code-pro""jetbrains-mono"theme_dark?stringThemeDark is required when ThemeMode is "sync". In "single" mode an empty value means "preserve the previously persisted slot" rather than "clear the slot", so partial updates that send only one slot keep the other intact.
"light""light-protan-deuter""light-tritan""dark""dark-protan-deuter""dark-tritan"theme_light?stringThemeLight is required when ThemeMode is "sync". In "single" mode an empty value means "preserve the previously persisted slot" rather than "clear the slot", so partial updates that send only one slot keep the other intact.
"light""light-protan-deuter""light-tritan""dark""dark-protan-deuter""dark-tritan"theme_mode?stringThemeMode is optional for backward compatibility. When empty, the server leaves theme_mode, theme_light, and theme_dark unchanged so older CLI clients do not erase sync-mode settings. Legacy auto preferences are the exception: they clear theme_mode so clients can migrate the old sync-with-system setting.
"sync""single"theme_preference*stringOK
application/json- response
terminal_font?codersdk.TerminalFontName"""geist-mono""ibm-plex-mono""fira-code""source-code-pro""jetbrains-mono"theme_dark?stringIgnored when ThemeMode is "single"
theme_light?stringIgnored when ThemeMode is "single"
theme_mode?codersdk.ThemeMode"""sync""single"theme_preference?stringThemePreference is the legacy single-field appearance setting. In "single" mode it mirrors the active theme. In "sync" mode modern clients normally mirror the active OS slot, but older clients can update only this field, so it may diverge from ThemeLight or ThemeDark until a modern client saves the full appearance state again.
The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X PUT \ "$CODER_URL/api/v2/users/{user}/appearance" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "terminal_font": "", "theme_preference": "string"}'{ "terminal_font": "", "theme_dark": "string", "theme_light": "string", "theme_mode": "", "theme_preference": "string"}