const url = 'https://api.gumloop.com/api/v1/start_pipeline';
const headers = {
'Content-Type': 'application/json',
Authorization: 'Bearer [INSERT API KEY HERE]',
};
const data = {
user_id: 'xxxxxxxxxxxxxx',
saved_item_id: 'xxxxxxxxxxxxxx',
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => console.log(data));