const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: 123,
ticket_id: 123,
text: '<string>',
files: [],
ai_chat: false,
trigger_internal_id: '<string>',
suggested_actions: [{}],
state: '<string>'
})
};
fetch('https://back.leap.onclarity.com/api/integration/ai_service/customer/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));