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://chat.virginvoyages.com/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 -X PATCH https://chat.virginvoyages.com/api/v1/settings/notifications \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    -d "enable_stream_desktop_notifications=true" \
    -d "enable_stream_email_notifications=true" \
    -d "enable_stream_push_notifications=true" \
    -d "enable_stream_sounds=true" \
    -d "enable_desktop_notifications=true" \
    -d "enable_sounds=true" \
    -d "enable_offline_email_notifications=true" \
    -d "enable_offline_push_notifications=true" \
    -d "enable_online_push_notifications=true" \
    -d "enable_digest_emails=true" \
    -d "message_content_in_email_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.

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.

message_content_in_email_notifications true No

Include the message's content in missed messages email notifications.

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"
}