const url = "https://api.berri.ai/update_instance";// Create a FormData objectconst formData = new FormData();// 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));
Copy
{ "message": "<string>", "status": "<string>"}
Endpoints
Update your Instance Data
Add Data (URLs, Files) to your Berri Instance
POST
/
update_instance
Copy
const url = "https://api.berri.ai/update_instance";// Create a FormData objectconst formData = new FormData();// 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));
Copy
{ "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.Request Parameters