Webhooks
Integrate real-time event notifications with Gconv Prune
Overview
Webhooks allow your application to receive real-time notifications when specific events occur in Gconv Prune. This guide explains how to set up and manage webhooks effectively.
Available Events
Chat Events
- chat.started - When a new chat session begins
- chat.message.created - When a message is sent
- chat.message.updated - When a message is edited
- chat.ended - When a chat session ends
System Events
- system.error - When a system error occurs
- system.warning - When a system warning is triggered
- system.update - When system updates are available
Implementation Example
Example of handling webhook events with Python Flask:
from flask import Flask, request app = Flask(__name__) @app.route("/webhook", methods=["POST"]) def handle_webhook(): event = request.json if event["type"] == "chat.message.created": # Handle new message process_new_message(event["data"]) return "", 200
Security
To ensure webhook security:
- Use HTTPS endpoints only
- Verify webhook signatures
- Implement retry logic with exponential backoff
- Set up proper error handling
Need Help?
For webhook integration help, check our troubleshooting guide or contact our support team.