Receive real-time events from AmDital via webhooks.
Configure webhook endpoints in your workspace settings to receive events.
POST ${API_URL}/webhooks
{
"url": "https://example.com/webhooks/amdital",
"events": ["task.created", "invoice.paid", "ticket.resolved"]
}CRM object events fire on the corresponding mutation. Deal lifecycle events are granular — a won deal fires deal.won (not just deal.updated).
lead.created | lead.updated | lead.deleted
deal.created | deal.updated | deal.deleted
deal.stage_changed | deal.won | deal.lost
// deal.stage_changed / deal.won / deal.lost payload.data:
{ id, name, fromStage?, toStage?, value, currency, lostReason? }Every webhook payload includes an X-AmDital-Signature header of the form sha256=<hex>. Verify it using your webhook secret with HMAC-SHA256 over the raw request body.
const crypto = require('crypto')
const sig = req.headers['x-amdital-signature'] // "sha256=<hex>"
const expected = 'sha256=' + crypto
.createHmac('sha256', WEBHOOK_SECRET)
.update(rawBody)
.digest('hex')
if (!crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected))) {
throw new Error('Invalid signature')
}AmDital retries failed deliveries up to 3 times with exponential backoff (10s, 60s, 300s). After 3 failures, the event is marked as failed and visible in the webhook logs.