Users

Update user appearance settings

Changed on
put/api/v2/users/{user}/appearance

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v2/users/{user}/appearance
  • Auth
    API key in header Coder-Session-Token

Path parameters

userstring required

User ID, name, or me

Request body

terminal_font'' | 'geist-mono' | 'ibm-plex-mono' | 'fira-code' | 'source-code-pro' | 'jetbrains-mono' required
theme_dark'light' | 'light-protan-deuter' | 'light-tritan' | 'dark' | 'dark-protan-deuter' | 'dark-tritan'

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.

theme_light'light' | 'light-protan-deuter' | 'light-tritan' | 'dark' | 'dark-protan-deuter' | 'dark-tritan'

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.

theme_mode'' | 'sync' | 'single'
theme_preferencestring required

Response

OK

terminal_font'' | 'geist-mono' | 'ibm-plex-mono' | 'fira-code' | 'source-code-pro' | 'jetbrains-mono'
theme_darkstring

Ignored when ThemeMode is "single"

theme_lightstring

Ignored when ThemeMode is "single"

theme_mode'' | 'sync' | 'single'
theme_preferencestring

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.

Changes