Entwickler

Webhooks

Ein signierter POST an Ihre URL, wenn sich ein Datensatz ändert.

Einrichten

SettingsDevelopersWebhooksWorkspace-Inhaber und Admins
  1. 1

    URL hinzufügen

    Eine öffentliche https://-Adresse. Private und interne Adressen werden abgelehnt.

  2. 2

    Events wählen

    Nur die gewählten Events werden gesendet.

  3. 3

    Secret sichern

    Das Signatur-Secret whsec_… wird nur einmal angezeigt.

  • Send test sendet ein ping-Event.
  • Letzte Zustellungen: die letzten 14 Tage.

Events

Datensatzcreatedupdateddeleted
contactcontact.createdcontact.updatedcontact.deleted
companycompany.createdcompany.updatedcompany.deleted
dealdeal.createddeal.updateddeal.deleted
notenote.creatednote.updatednote.deleted
tasktask.createdtask.updatedtask.deleted
Gesendet bei Änderungen ausder Appder APIImportenWorkflows

Anfrage

POSThttps://your-app.example.com/webhooks/promptlab
HeaderBeispiel
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 gibt es nur bei updated-Events.
  • changes enthält nur Felder, die die API zurückgibt.
  • name ist enthalten, wenn bekannt.
  • Events sind schlank: Den vollständigen Datensatz holen Sie über die API.
  • Keine Events für private Aufgaben oder für Notizen und Aufgaben in einem Projekt.
actor.typeuserintegrationsystem
REST-API

Signatur prüfen

  1. 1t und v1 aus PromptLab-Signature lesen.
  2. 2HMAC-SHA256 von <t>.<raw body> mit Ihrem Secret, als Hex.
  3. 3Mit v1 in konstanter Zeit vergleichen.
  4. 4Ablehnen, wenn t älter als 5 Minuten ist.
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", ""))

Wiederholungen

10 s
Timeout pro Versuch
6
Versuche über etwa 30 Minuten
20
Fehlgeschlagene Events in Folge schalten den Webhook ab
  • Jede Antwort außerhalb von 2xx oder ein Timeout wird wiederholt, mit exponentiellem Backoff.
  • Nutzen Sie die Event-id, um Duplikate zu ignorieren.
  • Abgeschaltet? In Settings wieder einschalten.