User
Update push preferences
Changed onUpdate push preferences
You can update a user's notifications preferences. 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.
put/v3/users/{user_id}/push_preference
Request
- Base URLhttps://api-APP_ID.sendbird.com
- Authnone declared
Path parameters
user_idstring required
(Required)
Headers
api-tokenstring
Example:{{API_TOKEN}}
Request body
Example request
{
"dnd_schedules": [
{
"time_windows": [
{
"end_min": 2,
"start_hour": 7,
"end_hour": 3,
"start_min": 9
},
{
"end_min": 2,
"start_hour": 7,
"end_hour": 3,
"start_min": 9
}
],
"day_of_week": "monday"
}
]
}Response
Successful response
Example response
{
"timezone": "timezone",
"push_blocked_bot_ids": [
"push_blocked_bot_ids",
"push_blocked_bot_ids"
],
"do_not_disturb": true,
"enable_push_for_replies": true,
"start_min": 2,
"snooze_end_ts": 1,
"dnd_schedules": [
{
"time_windows": [
{
"end_min": 2,
"start_hour": 7,
"end_hour": 3,
"start_min": 9
},
{
"end_min": 2,
"start_hour": 7,
"end_hour": 3,
"start_min": 9
}
],
"day_of_week": "monday"
},
{
"time_windows": [
{
"end_min": 2,
"start_hour": 7,
"end_hour": 3,
"start_min": 9
},
{
"end_min": 2,
"start_hour": 7,
"end_hour": 3,
"start_min": 9
}
],
"day_of_week": "monday"
}
],
"snooze_enabled": true,
"end_min": 6,
"push_sound": "push_sound",
"start_hour": 5,
"snooze_start_ts": 5,
"push_trigger_option": null,
"end_hour": 0,
"block_push_from_bots": true
}Changes
- info
added the new optional request property
- info
added the optional property
to the response with the status
- info
- breaking
removed the enum value
defaultof the request property - info
removed the
defaultenum value from theresponse property for the response status
- breaking