Skip to content
Skip to Content
Coder Docs

Update user appearance settings

PUT
/api/v2/users/{user}/appearance

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

user*string

User ID, name, or me

Request Body

New appearance settings

application/json
  1. body
terminal_font*codersdk.TerminalFontName
Value in"""geist-mono""ibm-plex-mono""fira-code""source-code-pro""jetbrains-mono"
theme_dark?string

ThemeDark 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.

Value in"light""light-protan-deuter""light-tritan""dark""dark-protan-deuter""dark-tritan"
theme_light?string

ThemeLight 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.

Value in"light""light-protan-deuter""light-tritan""dark""dark-protan-deuter""dark-tritan"
theme_mode?string

ThemeMode 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.

Value in"sync""single"
theme_preference*string

Response Body

OK

application/json
  1. response
terminal_font?codersdk.TerminalFontName
Value in"""geist-mono""ibm-plex-mono""fira-code""source-code-pro""jetbrains-mono"
theme_dark?string

Ignored when ThemeMode is "single"

theme_light?string

Ignored when ThemeMode is "single"

theme_mode?codersdk.ThemeMode
Value in"""sync""single"
theme_preference?string

ThemePreference 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"}'
Example Response200
{  "terminal_font": "",  "theme_dark": "string",  "theme_light": "string",  "theme_mode": "",  "theme_preference": "string"}