const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
whatsapp_phone_number_id: '<string>',
whatsapp_user_id: '<string>',
template_name: '<string>',
template_language_code: '<string>',
template_params: [
{
parameters: [{text: '<string>', parameter_name: '<string>', type: 'text'}],
type: 'header'
}
],
agent_id: '<string>'
})
};
fetch('https://api.threetone.in/v1/convai/whatsapp/outbound-message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));