User

Update push preferences for a channel

Changed on

Update push preferences for a channel

You can update a user's notifications preferences for a specific channel. A push notification is a message that is immediately delivered to a user's device when the device is either idle or running the client app in the background.

Note: Push notifications are only available for group channels.

https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/update-push-notification-preferences-for-a-channel#1-update-push-notification-preferences-for-a-channel

put/v3/users/{user_id}/push_preference/{channel_url}

Request

  • Base URL
    https://api-APP_ID.sendbird.com
  • Auth
    none declared

Path parameters

user_idstring required

(Required)

channel_urlstring required

(Required)

Headers

api-tokenstring
Example:{{API_TOKEN}}

Request body

push_trigger_option'default' | 'all' | 'mention_only' | 'false' required

The type of notifications trigger applies to group channels when a user is disconnected from Sendbird server. Acceptable values are the following: - default (default): Indicates that a user's notifications trigger setting applies to the specified channel. - all: Indicates that a user receives notifications for all new messages. - mention_only: Indicates that a user only receives notifications for mentioned messages. - off: Indicates that a user doesn't receive any notifications.

push_soundstring

Response

Successful response

enableboolean
push_soundstring
push_trigger_option'all' | 'mention_only' | 'off'

Example response

{
  "enable": true,
  "push_sound": "push_sound",
  "push_trigger_option": null
}

Changes

    • info

      removed the default enum value from the response property for the response status

    • breaking

      request property was restricted to a list of enum values

    • warning

      deleted the header request parameter Api-Token

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      added the new all enum value to the response property for the response status

    • warning

      added the new default enum value to the response property for the response status

    • warning

      added the new mention_only enum value to the response property for the response status

    • warning

      added the new off enum value to the response property for the response status

    • info

      api operation id updatePushPreferencesForChannelByUrl removed and replaced with updatePushPreferencesForAChannel

    • info

      added the new optional header request parameter api-token

    • info

      the request property became optional

    • info

      added the new all enum value to the request property

    • info

      added the new default enum value to the request property

    • info

      added the new false enum value to the request property

    • info

      added the new mention_only enum value to the request property