Webhooks are one of a few ways web applications can communicate with each other. It allows to send real-time data from one application to another whenever a given event occurs.
The Webhooks functionality can be used to send data to any URL endpoint. This allows for sending data to intermediaries (Zapier, Pabbly Connect, Wokato, APIFuse, etc), API endpoints on other platforms, or custom endpoints created by the user to receive data.
To set up a form to send submitted data to a custom Webhook URL, navigate to the Developer Hub >> Webhooks.
Available Webhook Events - Event Name
A "Webhook Event" is the action that triggers data to be sent to a Webhook Link (URL). The following Webhook Events are currently supported.
The actions column is going to display Edit and Delete options for Custom Webhooks. Default Webhook Events can't be deleted.
A user submitting the following forms will trigger the data submitted in those forms to be sent to the Webhook Link in addition to its normal functionality.
- Member Review Submitted - [form=member_review]
- Contact Us Form Submitted - [form=contact_form]
- Newsletter Signup - [form=newsletter_modal_signup]
- Lead Submitted - [form=bootstrap_get_match]
- Paid Members Signup - [form=whmcs_signup_paid]
- Free Members Signup - [form=signup_free]
- Members Imported / Added Via Admin (Sends data when members are imported or added manually via Admin)
- Post - Standard (Sends data when one of these gets created or updated: Videos, Articles, Jobs, Events, Coupons, Audios, Discussions)
- Post - Photo Album (Sends data when one of these gets created or updated: Photo Albums, Digital Products, Products, Classifieds, Properties)
- Contact Details Form Submitted - [form=member_contact_details & form=contact_general_user]
- Additional Details Form Submitted - [form=member_listing_details]
- About Me Form Submitted - [form=about]
- + Custom Forms
The category column explains what is the form that will send the data to the webhook.
Toggle On - Off to enable or disable the Webhook.
Enter the full URL of the endpoint the data should be sent to when the corresponding Webhook Event is triggered.
To create a custom webhook using a custom form click on "New Webhook +"
On the Pop Up window Custom Webhook:
- Select Custom Form
- Enter a Webhook Nickname
- Enter an Internal Description
Click on "Save Changes". To test the Webhook Event enter a Webhook Link and submit the custom form.
Save Webhook Settings
To save changes on the Webhook Events page.
Developers: How data is transferred with Webhooks
What happens when a Form Submission Webhook Event is triggered?
When a user submits one of the forms a Webhook is configured for, the data submitted in the form is sent to the Webhook URL via CURL (https://www.php.net/manual/es/book.curl.php) as a POST array.
For example, the default Contact Us form has the following fields:
- Name [yourname]
- Email [inquiry_email]
- Phone Number [phone]
- Message [comments]
A user submits the following information to these fields: