const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: 'f0ad9ad9-d421-48dc-868d-9760e33e5089',
stealthMonitoringSettings: {enableStealthMonitoring: true}
})
};
fetch('https://api.trackpilots.com/v1/settings/stealth-monitoring', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));