Docs/Events
EVENTS

Webhooks

Signed HTTPS POST requests sent to your endpoint for every change, so you never have to poll.

Set up an endpoint

  1. 1
  2. 2
  3. 3
  4. 4

Payload

{
  "id": "evt_01J9Z4D2F5H8K1M4P7R0T3V6X9",
  "type": "domain.renewed",
  "created_at": "2026-09-26T06:00:12Z",
  "test": false,
  "workspace": { "id": "wsp_01J9Z3F1C4E7G0J3M6Q9S2V5Y8" },
  "data": {
    "domain": {
      "id": "dom_01J9Z3K8V6Q2M4N7P5R8T0W1XY",
      "name": "harborgoods.com",
      "display_name": "harborgoods.com"
    },
    "after": { "expires_at": "2027-10-04T00:00:00Z" },
    "before": { "expires_at": "2026-10-04T00:00:00Z" }
  }
}

Verify the signature

import crypto from 'node:crypto';

export function verify(rawBody, headers, secret) {
  const timestamp = headers['x-lapsentry-timestamp'];
  const signature = headers['x-lapsentry-signature'];
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${timestamp}.${rawBody}`)
    .digest('hex');
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
}

Retries and ordering

Was this page helpful?