Update display settings

This endpoint is used to edit the current user's user interface settings.

PATCH https://team.webramz.com/api/v1/settings/display

Usage examples

#!/usr/bin/env python3

import zulip

# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")

# Show user list on left sidebar in narrow windows.
# Change emoji set used for display to Google modern.
request = {
    "left_side_userlist": True,
    "emojiset": "google",
}
result = client.call_endpoint("settings/display", method="PATCH", request=request)
print(result)

curl -sSX PATCH https://team.webramz.com/api/v1/settings/display \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    --data-urlencode left_side_userlist=true \
    --data-urlencode emojiset=google

Parameters

twenty_four_hour_time boolean optional

Example: true

Whether time should be displayed in 24-hour notation.


dense_mode boolean optional

Example: true

This setting has no effect at present. It is reserved for use in controlling the default font size in Zulip.


starred_message_counts boolean optional

Example: true

Whether clients should display the number of starred messages.


fluid_layout_width boolean optional

Example: true

Whether to use the maximum available screen width for the webapp's center panel (message feed, recent topics) on wide screens.


high_contrast_mode boolean optional

Example: true

This setting is reserved for use to control variations in Zulip's design to help visually impaired users.


color_scheme integer optional

Example: 1

Controls which color theme to use.

  • 1 - Automatic
  • 2 - Night mode
  • 3 - Day mode

Automatic detection is implementing using the standard prefers-color-scheme media query.


translate_emoticons boolean optional

Example: true

Whether to translate emoticons to emoji in messages the user sends.


default_language string optional

Example: "en"

What default language to use for the account.

This controls both the Zulip UI as well as email notifications sent to the user.

The value needs to be a standard language code that the Zulip server has translation data for; for example, "en" for English or "de" for German.

Changes: Removed unnecessary JSON-encoding of parameter in Zulip 4.0 (feature level 63).


default_view string optional

Example: "all_messages"

The default view used when opening a new Zulip webapp window or hitting the Esc keyboard shortcut repeatedly.

  • "recent_topics" - Recent topics view
  • "all_messages" - All messages view

Changes: Removed unnecessary JSON-encoding of parameter in Zulip 4.0 (feature level 64).


left_side_userlist boolean optional

Example: true

Whether the users list on left sidebar in narrow windows.

This feature is not heavily used and is likely to be reworked.


emojiset string optional

Example: "google"

The user's configured emoji set, used to display emoji to the user everything they appear in the UI.

  • "google" - Google modern
  • "google-blob" - Google classic
  • "twitter" - Twitter
  • "text" - Plain text

Changes: Removed unnecessary JSON-encoding of parameter in Zulip 4.0 (feature level 64).


demote_inactive_streams integer optional

Example: 1

Whether to demote inactive streams in the left sidebar.

  • 1 - Automatic
  • 2 - Always
  • 3 - Never

timezone string optional

Example: "Asia/Kolkata"

The user's configured timezone.

Timezone values supported by the server are served at /static/generated/timezones.json.

Changes: Removed unnecessary JSON-encoding of parameter in Zulip 4.0 (feature level 64).


Response

Return values

The server will return the settings that have been changed after the request, with their new value. Please note that this doesn't necessarily mean that it will return all the settings passed as parameters in the request, but only those ones that were different from the already existing setting.

Example response

A typical successful JSON response may look like:

{
    "emojiset": "google",
    "left_side_userlist": true,
    "msg": "",
    "result": "success"
}