Update settings
This endpoint is used to edit the current user's settings.
PATCH https://z.labs.greyorange.com/api/v1/settings
Changes: Prior to Zulip 5.0 (feature level 80), this
endpoint only supported the full_name
, email
,
old_password
, and new_password
parameters. Notification
settings were managed by PATCH /settings/notifications
, and
all other settings by PATCH /settings/display
.
The feature level 80 migration to merge these endpoints did not
change how request parameters are encoded. However, it did change
the handling of any invalid parameters present in a request
(see feature level 78 change below).
The /settings/display
and /settings/notifications
endpoints are now deprecated aliases for this endpoint for
backwards-compatibility, and will be removed once clients have
migrated to use this endpoint.
Changes: Prior to Zulip 5.0 (feature level 78),
the /settings
endpoint indicated which parameters it had
processed by including in the response object "key": value
entries for values successfully changed by the request. That
was replaced by the more ergonomic
ignored_parameters_unsupported
response parameter.
The /settings/notifications
and /settings/display
endpoints
also had this behavior before they became aliases of /settings
in Zulip 5.0 (see feature level 80 change above).
Before these changes, request parameters that were not supported
(or were unchanged) were silently ignored.
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Enable push notifications even when online and change emoji set
request = {
"enable_offline_push_notifications": True,
"enable_online_push_notifications": True,
"emojiset": "google",
}
result = client.call_endpoint("/settings", method="PATCH", request=request)
print(result)
curl -sSX PATCH https://z.labs.greyorange.com/api/v1/settings \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode left_side_userlist=true \
--data-urlencode emojiset=google
Parameters
full_name string optional
Example: "NewName"
A new display name for the user.
email string optional
Example: "newname@example.com"
Asks the server to initiate a confirmation sequence to change the user's email
address to the indicated value. The user will need to demonstrate control of the
new email address by clicking a confirmation link sent to that address.
old_password string optional
Example: "old12345"
The user's old Zulip password (or LDAP password, if LDAP authentication is in use).
Required only when sending the new_password
parameter.
new_password string optional
Example: "new12345"
The user's new Zulip password (or LDAP password, if LDAP authentication is in use).
The old_password
parameter must be included in the request.
twenty_four_hour_time boolean optional
Example: true
Whether time should be displayed in 24-hour notation.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
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.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
starred_message_counts boolean optional
Example: true
Whether clients should display the number of starred
messages.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
fluid_layout_width boolean optional
Example: true
Whether to use the maximum available screen width
for the web app's center panel (message feed, recent topics) on wide screens.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
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.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
color_scheme integer optional
Example: 1
Controls which color theme to use.
- 1 - Automatic
- 2 - Dark theme
- 3 - Light theme
Automatic detection is implementing using the standard prefers-color-scheme
media query.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
Must be one of: 1
, 2
, 3
.
enable_drafts_synchronization boolean optional
Example: true
A boolean parameter to control whether synchronizing drafts is enabled for
the user. When synchronization is disabled, all drafts stored in the server
will be automatically deleted from the server.
This does not do anything (like sending events) to delete local copies of
drafts stored in clients.
Changes: New in Zulip 5.0 (feature level 87).
translate_emoticons boolean optional
Example: true
Whether to translate emoticons to emoji
in messages the user sends.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
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: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 63).
default_view string optional
Example: "all_messages"
The default view used when opening a new
Zulip web app window or hitting the Esc
keyboard shortcut repeatedly.
- "recent_topics" - Recent topics view
- "all_messages" - All messages view
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 64).
escape_navigates_to_default_view boolean optional
Example: true
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.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
emojiset string optional
Example: "google"
The user's configured emoji set,
used to display emoji to the user everywhere they appear in the UI.
- "google" - Google modern
- "google-blob" - Google classic
- "twitter" - Twitter
- "text" - Plain text
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
Unnecessary JSON-encoding of this parameter was removed 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
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
Must be one of: 1
, 2
, 3
.
timezone string optional
Example: "Asia/Kolkata"
The user's configured time zone.
Time zone values supported by the server are served at
/static/generated/timezones.json.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/display
endpoint.
Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 64).
enable_stream_desktop_notifications boolean optional
Example: true
Enable visual desktop notifications for stream messages.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_stream_email_notifications boolean optional
Example: true
Enable email notifications for stream messages.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_stream_push_notifications boolean optional
Example: true
Enable mobile notifications for stream messages.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_stream_audible_notifications boolean optional
Example: true
Enable audible desktop notifications for stream messages.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
notification_sound string optional
Example: "ding"
Notification sound name.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
Unnecessary JSON-encoding of this parameter was removed in Zulip 4.0 (feature level 63).
enable_desktop_notifications boolean optional
Example: true
Enable visual desktop notifications for private messages and @-mentions.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_sounds boolean optional
Example: true
Enable audible desktop notifications for private messages and
@-mentions.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
email_notifications_batching_period_seconds integer optional
Example: 120
The duration (in seconds) for which the server should wait to batch
email notifications before sending them.
Changes: New in Zulip 5.0 (feature level 82)
enable_offline_email_notifications boolean optional
Example: true
Enable email notifications for private messages and @-mentions received
when the user is offline.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_offline_push_notifications boolean optional
Example: true
Enable mobile notification for private messages and @-mentions received
when the user is offline.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_online_push_notifications boolean optional
Example: true
Enable mobile notification for private messages and @-mentions received
when the user is online.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_digest_emails boolean optional
Example: true
Enable digest emails when the user is away.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_marketing_emails boolean optional
Example: true
Enable marketing emails. Has no function outside Zulip Cloud.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enable_login_emails boolean optional
Example: true
Enable email notifications for new logins to account.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
message_content_in_email_notifications boolean optional
Example: true
Include the message's content in email notifications for new messages.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
pm_content_in_desktop_notifications boolean optional
Example: true
Include content of private messages in desktop notifications.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
wildcard_mentions_notify boolean optional
Example: true
Whether wildcard mentions (E.g. @all) should send notifications
like a personal mention.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
desktop_icon_count_display integer optional
Example: 1
Unread count badge (appears in desktop sidebar and browser tab)
- 1 - All unreads
- 2 - Private messages and mentions
- 3 - None
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
Must be one of: 1
, 2
, 3
.
realm_name_in_notifications boolean optional
Example: true
Include organization name in subject of message notification emails.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
presence_enabled boolean optional
Example: true
Display the presence status to other users when online.
Changes: Before Zulip 5.0 (feature level 80), this setting was managed by
the PATCH /settings/notifications
endpoint.
enter_sends boolean optional
Example: true
Whether pressing Enter in the compose box sends a message
(or saves a message edit).
Changes: Before Zulip 5.0 (feature level 81), this setting was managed by
the POST /users/me/enter-sends
endpoint, with the same parameter format.
send_private_typing_notifications boolean optional
Example: true
Whether typing notifications be sent when composing
private messages.
Changes: New in Zulip 5.0 (feature level 105).
send_stream_typing_notifications boolean optional
Example: true
Whether typing notifications be sent when composing
stream messages.
Changes: New in Zulip 5.0 (feature level 105).
send_read_receipts boolean optional
Example: true
Whether other users are allowed to see whether you've
read messages.
Changes: New in Zulip 5.0 (feature level 105).
Response
Return values
-
ignored_parameters_unsupported
: (string)[]
An array of any parameters sent in the request that are not
supported by the endpoint. While this can be expected, e.g. when sending
both current and legacy names for a parameter to a Zulip server of
unknown version, this often indicates either a bug in the client
implementation or an attempt to configure a new feature while
connected to an older Zulip server that does not support said feature.
Changes: Added to POST /users/me/subscriptions/properties
in
Zulip 5.0 (feature level 111).
Added to PATCH /realm/user_settings_defaults
in Zulip 5.0 (feature level 96).
Introduced in PATCH /settings
in Zulip 5.0 (feature level 78).
Example response
A typical successful JSON response may look like:
{
"ignored_parameters_unsupported": [
"name",
"password"
],
"msg": "",
"result": "success"
}