Webhooks allow you to automatically receive real-time event data from Fello, without needing to continuously poll for changes. This is done by sending JSON data from Fello to your specified URL whenever certain events occur. For example, when a contact submits a form, a FormSubmission event triggers an HTTP POST request to the webhook URL you’ve set up for that event.
FormSubmission - Triggers when a form is submitted by a contact.
Fields in Form Data are optional - depends upon form and user choices
Copy
Ask AI
{ "events": [ { "eventType": "FormSubmission", "eventDate": "2024-11-12T00:00:00.000Z", "data": { "contactInfo": { "contactId": "<contactId>", "propertyId": "", "emailId": "<emailId>", "assignedUserEmailId": "owner@example.com" }, "formSubmissionInfo": { "leadType": "Home Value Lead", "formSubmissionId": "", "sourceType": "Landing Page", "sourceDetail": "My Home Value Landing Page", "submissionDate": "", "referrerUrl": "", "formData": { "firstName": "John", "lastName": "Doe", "phone": "(123) 456-7890", "emailId": "john@example.com", "address": "<Address>", "beds": 3, "baths": 3, "partialBaths": 1, "sqft": 2612, "storiesCount": 1, "parkingCount": 3, "yearBuilt": 2016, "basementPresent": false, "kitchenCondition": "Like new condition", "bathroomCondition": "Excellent & well maintained", "additionalBathroomCondition": "Like new condition", "flooringCondition": "Like new condition", "homePaintCondition": "In good shape & well maintained", "overallCondition": "In good shape & well maintained", "kitchenRemodeled": true, "bathsRemodeled": true, "partialBathsRemodeled": true, "wallPaintColorIntensity": "Walls are neutral", "hoa": true, "wellWater": false, "septicSystem": false, "solarPanels": false, "swimmingPool": false, "homeRemarks": "It’s going on the market as soon as the new roof gets put on. already have had a couple offers. leave me a message if you have an offer I will not pick up the phone call so if you’re interested, leave an offer.", "howDidYouHear": "Email", "buyingWithSelling": "Just Selling", "saleTimeline": "Less than 3 months", "homeWorth": "610000", "message": "Call me" } } } } ]}
DashboardClick - Triggers when a contact clicks a CTA in their dashboard.
In your application, create an endpoint that can handle HTTP POST requests at the URL specified during webhook registration. The request body will contain JSON data. To confirm receipt, respond within 10 seconds using a 2XX status code such as 200 or 204. Any other response indicates that the webhook was not received, prompting our system to retry at varying intervals for up to 8 hours.
For instance, an endpoint at might receive a POST request like this when a form is submitted in Fello:
We strongly recommend verifying the signature to ensure it is Fello who is making the webhook call. Each Fello App comes with
client secret which client can use to validate the webhook requests.
Request from Fello will include fello-webhook-signature header which can be used for HMAC based signature verification.
Sample code for validating signature in different languages is drafted below.
Copy
Ask AI
const crypto = require("crypto");const json = { "events": []}// request body -- note that it is an unformatted json stringconst body = JSON.stringify(json);// prepare a concatenated payload -- which we will signconst clientSecretFromFello = "<<your secret>>";const signatureFromFelloHeaders = "<<fello webhook signature header >>";// this function will generate signature and compare with fellofunction isRequestFromFello(signedContent, signatureFromFello, clientSecret) { const secretBytes = Buffer.from(clientSecret, "base64"); const mySignature = crypto .createHmac("sha256", secretBytes) .update(signedContent) .digest("base64"); return signatureFromFello === mySignature;}if (isRequestFromFello(body, signatureFromFelloHeaders, clientSecretFromFello)) { // do stuff console.log("Yes");} else { // reject request console.log("No");}
Your webhook endpoint should respond quickly—within 5 seconds—with a 200 or 204 status. If the request times out or returns any other status code, our system will retry for 4 hours, post that message would be lost.
Fello will automatically unsubscribe failing webhooks after multiple unsuccessful attempts. You will be notified by email if this occurs.
Because webhooks need a publicly accessible URL, testing them locally can be challenging. We recommend using a service like Webhook.site during development to simulate and verify webhook requests.