Skip to main content
1

1. Create your API key

Sign up at whetdata.com and create your API key in the dashboard.
2

2. Call the API

Here’s an example:
actions.ts
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);
And that’s it! You can now head to rulesets to fine-tune queries, take a look at some other actions, or head to the dashboard to see stats for your requests and add users to your project.
Need help? Contact support.