Receive real-time notifications about Elenik platform events and actions via secure webhook endpoints.
Webhooks allow Elenik to notify your applications about important events without constant polling. They're perfect for integrating platform actions into your workflows.
To configure webhooks, you'll need to register a URL through the Elenik Dashboard that will receive events.
// Set up webhook endpoint in dashboard
POST /api/webhooks
{
"url": "https://yourapp.com/webhook",
"events": ["task_complete", "subscription_paid"]
}
Try This Example
Webhooks can be created, updated, or deleted via the Developers Dashboard. You can also use our API to manage subscriptions.
Visual interface for managing subscriptions
Programmatic management of webhook endpoints
Command line interface for quick setup
Event Type | Description |
---|---|
task_complete | Triggered when an automated workflow finishes execution |
payment_verified | Sent after subscription payments are confirmed |
user_signup | Triggers when new users create an account |
{
"event": "task_complete",
"data": {
"task_id": "abc123",
"status": "completed",
"created_at": 1689824400
},
"signature": "HMAC_SHA256_SIGNATURE"
}
All requests include a signature header for authenticity checks
Only HTTPS endpoints are accepted for registration
import flask from flask import request import hmac import hashlib app = flask.Flask(__name__) @app.route('/webhook', methods=['POST']) def webhook(): payload = request.data signature_received = request.headers.get('X-Elenik-Signature') # Verify signature secret = 'your_webhook_secret' mac = hmac.new(secret.encode(), msg=payload, digestmod=hashlib.sha256) if not hmac.compare_digest(signature_received, mac.hexdigest()): return 'Invalid signature', 401 # Process payload data = request.json print(f"Received event: {data['event']}") return 'OK', 200
{ "event": "payment_verified", "data": { "user_id": "u_123", "amount": 49.99, "currency": "USD" }, "headers": { "X-Elenik-Signature": "sha256=abc123..." } }