Webhooks
A webhook enables different systems to automatically communicate by sending real-time notifications. Webhooks are proactive, eliminating the need to poll for updates.
In general, a webhook works as follows:
- Set up an HTTP endpoint on your server to receive incoming requests.
- Register and configure this endpoint in the system that sends the notifications.
- When a triggering event occurs, the platform sends an HTTP POST request with a payload - typically in JSON format - to your endpoint.
- Your server processes the payload based on how the endpoint is implemented.
Webhook messages often include a signature (such as an HMAC) to verify the authenticity and integrity of the request.
Webhooks are useful in many scenarios, especially when immediate action is needed - such as in security, finance, or user account management - or when an event should trigger a chain of actions.
You can manage webhooks on the Webhooks page under Notifications in the Pangea User Console .
Create a webhook
- In your Pangea User Console project, expand Notifications.
- Click Webhooks.
- Click + Webhook to add a new webhook.
- Enter a name and the webhook URL in the form.
- Click Create.
- The webhook is now listed on the Webhooks page.
Webhook details
Click an existing webhook tile to view its configuration details and the list of events that triggered the webhook.
Edit webhook
Click the pencil icon to open the Edit Webhook dialog, where you can:
- Update the webhook name as it appears in the console UI.
- Change the remote endpoint URL.
- Enable or disable the webhook.
To delete a webhook, use the triple-dot menu next to the pencil icon.
Signing Secret
The webhook payload is secured with an HMAC signature. In the Signing Secret row, click the Copy icon to copy its value. Use this secret to verify the authenticity of the request data on the receiving end and ensure it has not been tampered with in transit.
Examples for verifying the webhook signature and decrypting the payload are available in the Webhooks examples GitHub repository.
Watchlist
The Watchlist row displays the items currently using this webhook. Hover over any circle to see more details.
For example, you can view the names of AI Guard recipes and detectors associated with this webhook.
View logs
In the View Logs section, you can see a list of events reported by the webhook. Click any event row to expand and view its details.
Use the gear icon to choose which columns are displayed.
Use the filter icon, time range selector, and the Log Search Syntax to filter the events.
Adding webhooks to Pangea services
You can trigger webhooks from the AI Guard service to alert your system when a detector reports a risk event. Your system can then respond to the event to prevent or minimize negative outcomes.
For details on setting up and using webhooks with AI Guard, see the AI Guard Recipes documentation.
Was this article helpful?