const url ="https://api.berri.ai/update_instance";// Create a FormData objectconst formData =newFormData();// Append the key-value pair to the FormData objectformData.append('data_source','https://warmly.ai/');formData.append('user_email','ishaan@berri.ai');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));
{"message":"<string>","status":"<string>"}
This endpoint allows you to update an existing instance with new data.
You need to provide the data source URL, the user email, and the instance ID as part of the request.
const url ="https://api.berri.ai/update_instance";// Create a FormData objectconst formData =newFormData();// Append the key-value pair to the FormData objectformData.append('data_source','https://warmly.ai/');formData.append('user_email','ishaan@berri.ai');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));
const url ="https://api.berri.ai/update_instance";// Create a FormData objectconst formData =newFormData();// Append the key-value pair to the FormData objectformData.append('data_source','https://warmly.ai/');formData.append('user_email','ishaan@berri.ai');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));