Developers

Webhooks

A signed POST to your URL when a record changes.

Set up

SettingsDevelopersWebhooksWorkspace owners and admins
  1. 1

    Add your URL

    A public https:// address. Private and internal addresses are refused.

  2. 2

    Pick events

    Only the events you choose are sent.

  3. 3

    Save the secret

    The whsec_… signing secret is shown once.

  • Send test sends a ping event.
  • Recent deliveries: last 14 days.

Events

Recordcreatedupdateddeleted
contactcontact.createdcontact.updatedcontact.deleted
companycompany.createdcompany.updatedcompany.deleted
dealdeal.createddeal.updateddeal.deleted
notenote.creatednote.updatednote.deleted
tasktask.createdtask.updatedtask.deleted
Sent for changes made inthe appthe APIimportsworkflows

Request

POSThttps://your-app.example.com/webhooks/promptlab
HeaderExample
PromptLab-Eventdeal.updated
PromptLab-Deliveryevt_…
PromptLab-Signaturet=1700000000,v1=<hex>
User-AgentPromptLab-Webhooks/1.0
Content-Typeapplication/json
Body
{
  "id": "evt_…",
  "type": "deal.updated",
  "createdAt": "2026-10-22T08:15:51.000Z",
  "data": {
    "id": "<record id>",
    "object": "deal",
    "name": "API deal",
    "changes": [
      { "field": "stage", "from": "NEW", "to": "QUALIFIED" }
    ]
  },
  "actor": { "type": "user", "id": "<user id>" }
}
  • changes comes only with updated events.
  • changes lists only fields the API returns.
  • name is included when known.
  • Events are thin: fetch the full record with the API.
  • No events for private tasks, or for notes and tasks in a project.
actor.typeuserintegrationsystem
REST API

Verify the signature

  1. 1Read t and v1 from PromptLab-Signature.
  2. 2HMAC-SHA256 of <t>.<raw body> with your secret, as hex.
  3. 3Compare with v1 in constant time.
  4. 4Reject if t is older than 5 minutes.
Node.js
import crypto from "node:crypto";

// rawBody: the request body exactly as received (a string or Buffer)
export function verify(rawBody, header, secret) {
  if (typeof header !== "string") return false;
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > 5 * 60) return false;

  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${t}.${rawBody}`)
    .digest("hex");

  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1 ?? "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

// Express: read the body raw, so it is signed exactly as sent
// app.post("/webhooks/promptlab", express.raw({ type: "application/json" }), (req, res) => {
//   if (!verify(req.body, req.get("PromptLab-Signature"), process.env.PROMPTLAB_WEBHOOK_SECRET)) return res.sendStatus(400);
//   const event = JSON.parse(req.body);
//   res.sendStatus(200);
// });
Python
import hashlib, hmac, time

# raw_body: the request body exactly as received (bytes)
def verify(raw_body: bytes, header: str, secret: str) -> bool:
    try:
        parts = dict(p.split("=", 1) for p in (header or "").split(","))
        t = int(parts.get("t", 0))
    except ValueError:
        return False
    if not t or abs(time.time() - t) > 5 * 60:
        return False

    signed = f"{t}.".encode() + raw_body
    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))

Retries

10 s
Timeout per attempt
6
Attempts over about 30 minutes
20
Failed events in a row turn the webhook off
  • Any non-2xx answer or a timeout is retried, with exponential backoff.
  • Use the event id to ignore duplicates.
  • Turned off? Turn it back on in Settings.