const url = 'https://api.channelautomation.com/api/knowledge-studio/retrieve';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'string',
agent_config_id: 'ad864fb7-5a30-4692-ba6e-a3153683a0d2',
intent: 'string',
channel: 'string'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));