Skip to main content

Webhooks

Webhooks push events to your system when things change in a workspace, so you do not have to poll. Subscriptions are per workspace (owner/admin only), created in Settings → Integrations: a URL plus an event selection. Each subscription gets a signing secret, shown once.

Events fire from the domain's own save triggers, so they catch all writes — UI, public API, AI, and Flow — not just API writes. Payloads are summaries (id, title, status, timestamps), never full records or sensitive fields.

Events (57 across 15 domains)​

DomainEvents
taskstask.created, task.updated, task.completed, task.archived, task.restored
projectsproject.created, project.updated, project.archived
correspondencecorrespondence.created, correspondence.received, correspondence.updated
calendarcalendar_event.created, calendar_event.updated, calendar_event.archived, calendar_event.restored
financefinance_record.created, finance_record.updated, finance_record.archived, finance_record.restored, financial_document.created, financial_security.created
contractscontract.created, contract.updated, contract.archived, contract.restored
commercialcommercial_opportunity.created, commercial_proposal.created
risksrisk.created, risk.updated, risk.archived, risk.restored
inventorysupply_request.created, supply_request.updated, supply_request.archived, supply_request.restored, inventory_item.created, inventory_item.updated, inventory_item.archived, inventory_item.restored
deliverablesdeliverable.created, deliverable.updated
contactscontact.created, contact.updated, contact.archived, contact.restored
notesnote.created, note.updated, note.archived, note.restored
knowledgewiki_page.created, wiki_page.updated, wiki_page.archived, wiki_page.restored
workflowsworkflow.case.started, workflow.definition.published
filesfile.uploaded, file.linked

task.completed fires on the status transition to done; correspondence.received fires for inbound letters. A webhook.test event is available on demand from the Test button in Settings.

Delivery​

Each delivery is an HTTPS POST with these headers:

  • X-Kalaaf-Signature: sha256=<HMAC-SHA256 hex of the raw body, keyed with the subscription secret>
  • X-Kalaaf-Timestamp — delivery time
  • X-Kalaaf-Delivery-Id — unique per delivery

Delivery is at-least-once: the same event may arrive twice. Dedupe by X-Kalaaf-Delivery-Id.

Verify the signature​

Always verify against the raw request body, not a re-serialized JSON object:

// Node.js (Express)
const crypto = require("crypto");
const signature = req.get("X-Kalaaf-Signature"); // "sha256=<hex>"
const expected = "sha256=" + crypto
.createHmac("sha256", process.env.KALAAF_WEBHOOK_SECRET)
.update(req.rawBody) // the raw bytes, e.g. via express.raw()
.digest("hex");
const valid = crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
# Python
import hashlib, hmac
signature = request.headers["X-Kalaaf-Signature"] # "sha256=<hex>"
expected = "sha256=" + hmac.new(
SECRET.encode(), request.data, hashlib.sha256
).hexdigest()
valid = hmac.compare_digest(signature, expected)

Retries​

Your endpoint must answer within 10 seconds with a 2xx status. Otherwise Kalaaf retries with backoff — 1 minute, 5 minutes, 30 minutes, 2 hours, 12 hours — for 6 attempts total (1 initial + 5 retries), then marks the delivery failed. Every attempt is recorded in the delivery log (30-day retention), visible in Settings with status, attempts, last HTTP status, and last error.

URL rules​

Subscription URLs must be https, with no embedded credentials and no localhost. The hostname is resolved and all resolved IPs must be public (checked at creation and at delivery); redirects are never followed. For local testing, use a public tunnel.

Troubleshooting​

  • No deliveries arriving: check the subscription is active (not paused), the event list includes the event, and the endpoint is reachable from the server (the SSRF guard refuses private IPs).
  • Deliveries failing: open the delivery log in Settings — each row shows the HTTP status and the error. Common causes: non-2xx responses, response times over 10 s, TLS errors, or a redirect.
  • Signature mismatch: verify with the raw body, the current secret (rotating invalidates the old one immediately), and HMAC-SHA256 hex with the sha256= prefix.
  • Duplicate deliveries: expected — delivery is at-least-once. Dedupe by X-Kalaaf-Delivery-Id.