Real-time event notifications for your applications
Subscribe to events and receive HTTP POST notifications in real-time
Example POST request:
POST https://api.cognexiaai.com/v1/webhooks
Authorization: Bearer YOUR_API_KEY
{
"url": "https://yourapp.com/webhook",
"events": ["contact.created", "deal.closed"],
"description": "Production webhook"
}CRM Events
Finance Events
HR Events
System Events
{
"id": "evt_123456",
"type": "contact.created",
"created": 1706543400,
"data": {
"object": {
"id": "cnt_789",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane@example.com",
"company": "Acme Corp",
"createdAt": "2026-01-29T15:30:00Z"
}
}
}const crypto = require('crypto');
app.post('/webhook', (req, res) => {
const signature = req.headers['x-cognexia-signature'];
const secret = process.env.WEBHOOK_SECRET;
const hmac = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(req.body))
.digest('hex');
if (signature === hmac) {
// Process event
const event = req.body;
console.log('Event:', event.type);
res.sendStatus(200);
} else {
res.sendStatus(401);
}
});import hmac
import hashlib
@app.route('/webhook', methods=['POST'])
def webhook():
signature = request.headers.get('X-Cognexia-Signature')
secret = os.environ.get('WEBHOOK_SECRET')
computed = hmac.new(
secret.encode(),
request.data,
hashlib.sha256
).hexdigest()
if signature == computed:
event = request.json
print(f"Event: {event['type']}")
return '', 200
return '', 401Respond Quickly
Return 200 status within 5 seconds. Process asynchronously.
Handle Retries
Events retry up to 3 times with exponential backoff
Idempotency
Use event ID to prevent duplicate processing