const url = 'https://api.channelautomation.com/api/agent-teams/workspace/%7BworkspaceId%7D/preview';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({contact_id: 'string', contact: {}})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));