KIVEX

Webhooks

Receive events from KIVEX on your server and verify that they come from KIVEX.

Webhooks send an HTTP request to your server when an event happens on one of your sites, for example when a visitor leaves an inquiry or asks to talk to a person. Use them instead of polling the API.

Create a subscription

  1. In the Hub, go to your organization's settings and open Integrations → Webhooks.
  2. Enter the URL of your endpoint. It must use https and resolve to a public address.
  3. Select the events you want to receive.
  4. Select the sites the subscription applies to, or leave all sites selected.
  5. Save the subscription and copy the signing secret.

The signing secret is shown only once. Store it with your other secrets. You need it to verify signatures.

Personal data is off by default. See Personal data before you turn it on.

Event payload

KIVEX sends each event as a POST request with a JSON body:

{
  "id": "0192a8e4-7c3e-7a1b-9f0e-2d4c5b6a7e81",
  "type": "inquiry.created",
  "version": 1,
  "timestamp": "2026-10-09T14:05:00.000Z",
  "siteId": "site_01J9Z3",
  "data": { "inquiryId": "inq_01J9Z7", "siteId": "site_01J9Z3", "sitePublicId": "wgt_0f3c9a7e2b5d4c1a8e6f9b2d7c4a1e53", "source": "chatbot", "conversationId": "cnv_01J9Z5", "status": "new" }
}

data contains ids only. Use sitePublicId when you call the API for the site. To get the contact and the message, call inquiry.get with your API key, or turn on personal data for the subscription.

Respond to events

Return a 2xx status within 10 seconds. If you need more time, add the event to a queue, respond with 200, and process it afterwards.

Verify signatures

Verify every request before you process it. KIVEX signs requests according to the Standard Webhooks specification, so you can use any Standard Webhooks library:

import { Webhook } from "standardwebhooks"

const wh = new Webhook(process.env.KIVEX_WEBHOOK_SECRET) // "whsec_..."

app.post("/kivex", express.raw({ type: "application/json" }), (req, res) => {
  let event
  try {
    // Throws if the signature is invalid or the timestamp is older than 5 minutes.
    event = wh.verify(req.body, req.headers)
  } catch {
    return res.status(400).end()
  }
  queue.add(event)
  res.status(200).end()
})

Pass the raw request body to verify. If you parse the JSON and serialize it again, the bytes change and the signature check fails.

To verify signatures without a library, use these headers:

HeaderValue
webhook-idThe event id. It stays the same when KIVEX retries the event.
webhook-timestampThe time of this attempt, in seconds since the Unix epoch. Reject requests older than a few minutes.
webhook-signaturev1, followed by the base64-encoded HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{body}. The key is the base64-decoded part of the secret after whsec_. During a secret rotation the header contains two signatures separated by a space. Accept the request if either one matches.

Retries

If your endpoint doesn't return a 2xx status within 10 seconds, KIVEX retries the event after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours. That is eight attempts over about 27 hours. If all of them fail, KIVEX stops retrying and sends an e-mail to the people in your organization who manage webhooks.

Because of retries, your endpoint can receive the same event more than once. Store the id of each event you process and ignore events you have already processed.

If all deliveries to a subscription fail for 24 hours, KIVEX pauses the subscription and notifies you by e-mail. Events that occur while the subscription is paused are kept and delivered after you resume it in the Hub.

The Hub shows every delivery from the last 30 days, with each attempt and your server's response. You can resend any delivery from there.

Personal data

When you turn on personal data, each event also includes a personal object. For inquiry events it contains the contact and the message. For handover events it contains the text of the visitor's message.

Turn this on only if the receiving system is allowed to process this data and stores it securely.

Rotate the secret

Rotate the secret in the Hub when someone who had access to it leaves, or on a regular schedule. For 24 hours after a rotation, KIVEX signs each request with both the old and the new secret, so you can deploy the new secret without missing events.

On this page