#Introduction

#What are webhooks ?

A webhook is used to trigger an action following an event.
Webhooks are a way for an app or a system to communicate with another one automatically (eg: notifications, alerts, error management, etc.).

#Webhooks and Poool

Poool allows you to retrieve data from your wall and display custom error messages on the newsletter & form widgets.

#Use webhooks

#1. Define an endpoint

Start by creating a POST endpoint on your server (e.g. https://example.com/webhooks).

#2. Activate webhooks service in Poool's Dashboard

In your dashboard, activate the webhooks service inside the Poool's dashboard Access settings of your app, under the "Third party integrations" section.
You can then define two webhooks, one for the newsletter and one for the form submissions.
Fill the URL of your route in the appropriate field and save your changes.

#3. Configure your endpoint

It is mandatory to configure the body of your webhook response to be able to customize the messages sent to the paywall.
The response must respect the following conditions :
  • status : 2xx. All response codes outside 2xx range will be ignored.
  • content-type : application/json.
  • body : The response body. See the description of the different available webhooks.
⚠️ As long as you return a 200 status with a payload containing field names & errors, your reader will not be able to unlock his article.