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://cupid-zulip.lngs.infn.it/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://cupid-zulip.lngs.infn.it/api/v1/settings/notifications \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
-d 'enable_offline_push_notifications=true' \
-d 'enable_online_push_notifications=true'
Arguments
Argument |
Example |
Required |
Description |
enable_stream_desktop_notifications |
true |
No |
Enable visual desktop notifications for stream messages. |
enable_stream_email_notifications |
true |
No |
Enable email notifications for stream messages. |
enable_stream_push_notifications |
true |
No |
Enable mobile notifications for stream messages. |
enable_stream_audible_notifications |
true |
No |
Enable audible desktop notifications for stream messages. |
notification_sound |
"ding" |
No |
Notification sound name. |
enable_desktop_notifications |
true |
No |
Enable visual desktop notifications for private messages and @-mentions. |
enable_sounds |
true |
No |
Enable audible desktop notifications for private messages and @-mentions. |
enable_offline_email_notifications |
true |
No |
Enable email notifications for private messages and @-mentions received when the user is offline. |
enable_offline_push_notifications |
true |
No |
Enable mobile notification for private messages and @-mentions received when the user is offline. |
enable_online_push_notifications |
true |
No |
Enable mobile notification for private messages and @-mentions received when the user is online. |
enable_digest_emails |
true |
No |
Enable digest emails when the user is away. |
enable_login_emails |
true |
No |
Enable email notifications for new logins to account. |
message_content_in_email_notifications |
true |
No |
Include the message's content in missed messages email notifications. |
pm_content_in_desktop_notifications |
true |
No |
Include content of private messages in desktop notifications. |
wildcard_mentions_notify |
true |
No |
Whether wildcard mentions (E.g. @all) should send notifications like a personal mention. |
desktop_icon_count_display |
1 |
No |
Unread count summary (appears in desktop sidebar and browser tab)
- 1 - All unreads
- 2 - Private messages and mentions
- 3 - None
Must be one of: 1 , 2 , 3 . |
realm_name_in_notifications |
true |
No |
Include organization name in subject of missed message emails. |
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"
}