const url = 'https://api.channelautomation.com/api/livechat/video/prepare';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
body: JSON.stringify({workspaceId: 'string', storagePath: 'string', purpose: 'flow-rcs'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));