const url = 'https://api.channelautomation.com/api/outbound-iq/settings';
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
body: JSON.stringify({
workspace_id: 'string',
assignment_enabled: true,
post_dials: true,
campaign_name: 'string'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));