const response = await fetch("https://whetdata.com/api/ult", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.WHET_API_KEY,
},
body: JSON.stringify({
action: ["nudges"], // select which actions you want returned.
ruleset: "product", // select on the dashboard or specify here.
text: "This product is good and works well.",
max_nudges: 3,
}),
});
const data = await response.json();
console.log(data);