Update notification settings
This endpoint is used to edit the user's global notification settings.
See this endpoint for
per-stream notification settings.
PATCH https://we.comake.online/api/v1/settings/notifications
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
request = {
"enable_offline_push_notifications": True,
"enable_online_push_notifications": True,
}
result = client.update_notification_settings(request)
print(result)
curl -sSX PATCH https://we.comake.online/api/v1/settings/notifications \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode enable_offline_push_notifications=true \
--data-urlencode enable_online_push_notifications=true
Parameters
enable_stream_desktop_notifications boolean optional
Example: true
Enable visual desktop notifications for stream messages.
enable_stream_email_notifications boolean optional
Example: true
Enable email notifications for stream messages.
enable_stream_push_notifications boolean optional
Example: true
Enable mobile notifications for stream messages.
enable_stream_audible_notifications boolean optional
Example: true
Enable audible desktop notifications for stream messages.
notification_sound string optional
Example: "ding"
Notification sound name.
Changes: Removed unnecessary JSON-encoding of parameter in Zulip 4.0 (feature level 63).
enable_desktop_notifications boolean optional
Example: true
Enable visual desktop notifications for private messages and @-mentions.
enable_sounds boolean optional
Example: true
Enable audible desktop notifications for private messages and
@-mentions.
enable_offline_email_notifications boolean optional
Example: true
Enable email notifications for private messages and @-mentions received
when the user is offline.
enable_offline_push_notifications boolean optional
Example: true
Enable mobile notification for private messages and @-mentions received
when the user is offline.
enable_online_push_notifications boolean optional
Example: true
Enable mobile notification for private messages and @-mentions received
when the user is online.
enable_digest_emails boolean optional
Example: true
Enable digest emails when the user is away.
enable_marketing_emails boolean optional
Example: true
Enable marketing emails. Has no function outside Zulip Cloud.
enable_login_emails boolean optional
Example: true
Enable email notifications for new logins to account.
message_content_in_email_notifications boolean optional
Example: true
Include the message's content in email notifications for new messages.
pm_content_in_desktop_notifications boolean optional
Example: true
Include content of private messages in desktop notifications.
wildcard_mentions_notify boolean optional
Example: true
Whether wildcard mentions (E.g. @all) should send notifications
like a personal mention.
desktop_icon_count_display integer optional
Example: 1
Unread count summary (appears in desktop sidebar and browser tab)
- 1 - All unreads
- 2 - Private messages and mentions
- 3 - None
realm_name_in_notifications boolean optional
Example: true
Include organization name in subject of message notification emails.
presence_enabled boolean optional
Example: true
Display the presence status to other users when online.
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 than the already existing setting.
Example response
A typical successful JSON response may look like:
{
"enable_offline_push_notifications": true,
"enable_online_push_notifications": true,
"msg": "",
"result": "success"
}