const url = "https://api.berri.ai/update_instance";
// Create a FormData object
const formData = new FormData();
// Append the key-value pair to the FormData object
formData.append('data_source', 'https://warmly.ai/');
formData.append('user_email', '[email protected]');
formData.append('instance_id', 'd9a80b24-bb81-4c5d-bb76-5034bbdf9fed');
fetch(url, {
method: 'POST',
body: formData // Use the FormData object as the request body
})
.then(response => response.text())
.then(text => console.log(text))
.catch(error => console.error('Error:', error));