Client-side example

For public websites, proxy submissions through your own server or serverless function when possible so the shared secret is not exposed in browser code.

await fetch("https://instachime.com/api/webhooks/capture", {
  method: "POST",
  headers: {
    "content-type": "application/json",
    "x-instachime-secret": process.env.INSTACHIME_WEBHOOK_SECRET
  },
  body: JSON.stringify({
    source: "landing_page",
    full_name: form.name,
    email: form.email,
    phone: form.phone,
    message: form.message
  })
});