Quickstart
Quickstart
Get voice feedback running on your site in under 5 minutes.
You'll need an API key from your Hearloop dashboard before starting.
Get your API key
Sign in to your dashboard and navigate to API keys. Click "Generate key" and copy your sk-live_ key.
Add the widget script
Paste this before your closing </body> tag:
html
<script src="https://hearloop.vercel.app/widget.js"></script>
<script>
  Hearloop.init({
    apiKey: "sk-live_your_key_here",
    promptText: "How was your service today?",
    maxDurationSec: 5,
    position: "bottom-right"
  });
</script>
Set up your webhook
Add a webhook endpoint in your dashboard. Hearloop will POST structured JSON to your URL when feedback is processed.
typescript
// Your webhook handler (Next.js example)
export async function POST(req: Request) {
  const sig = req.headers.get("x-hearloop-signature");
  const body = await req.text();

  // Verify signature
  const valid = verifySignature(body, sig, process.env.WEBHOOK_SECRET);
  if (!valid) return new Response("Unauthorized", { status: 401 });

  const event = JSON.parse(body);

  if (event.type === "session.completed") {
    const { transcript, sentiment, topics, urgency } = event.data.analysis;
    // Handle your feedback data here
    console.log({ transcript, sentiment, topics, urgency });
  }

  return new Response("OK");
}
You're live
The green Hearloop bubble will appear on your site. Customers tap, speak for up to 5 seconds, and you receive structured insights automatically.