What are webhooks?
Webhooks are used to notify one system of a state change in another system.
In practical terms, a webhook is simply an HTTP request - usually a POST or GET - with a JSON payload or parameters broadcast from the central system. Webhooks are commonly used to notify third-party systems of events.
Without webhooks (polling)
Fetching new events without Webhooks would require regular synchronous calls to an API to retrieve the data:
- Must loop every X time
- Quota issues
- No real-time Notification
Getting information with webhooks:
- Ease of integration
- No quota issues
- Real-time Notification
Along with the analysis API, we offer webhooks capabilities. These Webhooks enable real-time notifications about the status changes of certain resources provided by Bodyguard.ai. They are simple HTTPS POST requests.
When to use webhooks
Webhooks enable you to automate actions on your application based on Bodyguard.ai events. We highly recommend integrating Bodyguard's webhooks to keep track of the state of each resource.
Webhook notification usage include:
- SPAM detection - you will receive a notification indicating that a message has been classified as SPAM
- Automatic author decision-making - you will receive notifications based on the author's behavior (eg: Bot, Scammer...)
- Manual actions taken from our dashboard - message removal or author ban
How it works
Webhook integration is done in 2 steps:
- Create a Webhook dedicated endpoint on your server (see our example here)
- Configure and register this endpoint on your dashboard settings