Webhooks

Real-time event notifications for your integrations.

Last updated: Feb 1, 2026

Overview

LeadShark sends webhooks via HTTP POST with JSON payloads. All webhooks include security headers for verification.

Email Captured

email.captured

Pro
Profile Visit

new.profile.visit

Apex
Post Like

new.like

Apex
Post Comment

new.comment

Pro

Authentication & Security

Security Headers

X-Webhook-SignatureHMAC-SHA256 signature
X-Webhook-EventEvent type
Content-Typeapplication/json

Signature Verification

const crypto = require('crypto');

function verifySignature(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(JSON.stringify(payload))
    .digest('hex');
  return signature === expected;
}

Email Captured

Pro
Event: email.captured— When a lead provides their email

Payload

{
  "event": "email.captured",
  "timestamp": "2025-09-15T11:43:42.659+00:00",
  "data": {
    "lead": {
      "name": "John Doe",
      "title": "Senior Marketing Manager",
      "email": "john.doe@example.com",
      "linkedin_username": "john-doe-12345"
    },
    "automation": {
      "id": "58c132e6-648c-4079-8815-77a3b2ec1adc",
      "name": "Q4 Marketing Guide"
    }
  }
}

Fields

FieldType
eventstring
timestampstring
data.lead.emailstring
data.automation.idstring

Profile Visit

Apex
Event: new.profile.visit— When someone visits your profile

Payload

{
  "event": "new.profile.visit",
  "timestamp": "2025-09-15T11:37:21.709Z",
  "data": {
    "visitor": {
      "id": "ACoAAEXAMPLE987654321",
      "name": "Jane Smith",
      "title": "Product Manager at Innovation Labs",
      "linkedin_url": "https://linkedin.com/in/jane-smith"
    },
    "profile_owner": {
      "id": "ACoAAEXAMPLE123456789",
      "name": "Your Name"
    }
  }
}

Post Like

Apex
Event: new.like— Requires "Require like" enabled on automation

Payload

{
  "event": "new.like",
  "timestamp": "2025-09-15T12:38:50.258Z",
  "data": {
    "lead": {
      "name": "Michael Johnson",
      "title": "Sales Director",
      "linkedin_url": "https://linkedin.com/in/michael-johnson",
      "connection_status": "Connected"
    },
    "automation": { "id": "uuid", "name": "Engagement Campaign" },
    "post_id": "urn:li:activity:7372270383585984512"
  }
}

Post Comment

Pro
Event: new.comment— When someone comments on your post

Payload

{
  "event": "new.comment",
  "timestamp": "2025-09-15T12:42:27.124Z",
  "data": {
    "lead": {
      "name": "Sarah Wilson",
      "title": "Content Marketing Specialist",
      "linkedin_url": "https://linkedin.com/in/sarah-wilson",
      "connection_status": "2nd Connection"
    },
    "comment": {
      "id": "7371940875070795776",
      "text": "Great insights! Thanks for sharing.",
      "created_at": "2025-09-11T16:21:08.656Z"
    },
    "automation": { "id": "uuid", "name": "Content Engagement" }
  }
}

Setup Guide

  1. Configure webhook endpoint in Dashboard Settings
  2. Select event types to receive
  3. Save your webhook secret for verification
  4. Ensure endpoint returns 2xx status

Important

  • • Webhooks timeout after 5-10 seconds
  • • Return 2xx status to acknowledge

Code Examples

Node.js / Express

const express = require('express');
const crypto = require('crypto');
const app = express();
app.use(express.json());

app.post('/webhook', (req, res) => {
  const sig = req.headers['x-webhook-signature'];
  const expected = crypto.createHmac('sha256', process.env.WEBHOOK_SECRET)
    .update(JSON.stringify(req.body)).digest('hex');

  if (sig !== expected) return res.status(401).json({ error: 'Invalid' });

  switch (req.headers['x-webhook-event']) {
    case 'email.captured':
      console.log('Email:', req.body.data.lead.email);
      break;
    case 'new.comment':
      console.log('Comment:', req.body.data.comment.text);
      break;
  }
  res.json({ received: true });
});

Python / Flask

from flask import Flask, request, jsonify
import hmac, hashlib, json, os

app = Flask(__name__)

@app.route('/webhook', methods=['POST'])
def webhook():
    sig = request.headers.get('X-Webhook-Signature')
    secret = os.environ.get('WEBHOOK_SECRET')
    expected = hmac.new(secret.encode(),
        json.dumps(request.json, separators=(',',':')).encode(),
        hashlib.sha256).hexdigest()
    
    if not hmac.compare_digest(sig, expected):
        return jsonify({'error': 'Invalid'}), 401
    
    return jsonify({'received': True})

Need Help?

Contact our team for webhook support.

Contact