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
Proemail.captured
Profile Visit
Apexnew.profile.visit
Post Like
Apexnew.like
Post Comment
Pronew.comment
Authentication & Security
Security Headers
X-Webhook-Signature— HMAC-SHA256 signatureX-Webhook-Event— Event typeContent-Type— application/jsonSignature 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
ProEvent:
email.captured— When a lead provides their emailPayload
{
"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
| Field | Type |
|---|---|
| event | string |
| timestamp | string |
| data.lead.email | string |
| data.automation.id | string |
Profile Visit
ApexEvent:
new.profile.visit— When someone visits your profilePayload
{
"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
ApexEvent:
new.like— Requires "Require like" enabled on automationPayload
{
"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
ProEvent:
new.comment— When someone comments on your postPayload
{
"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
- Configure webhook endpoint in Dashboard Settings
- Select event types to receive
- Save your webhook secret for verification
- 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.
