const url = 'https://api.sureshake.com/v2/notifications/preferences/entity/<entityId>';
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({digestFrequencyOverride: 'immediate', muted: true})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));