How to Set Up Webhooks for Real-Time Listing Updates


MaveMave Saved Months Of Development Time
WahiWahi Built a National Product in Record Time
PinePine (Formerly Properly) Cut Costs
Buy.caBuy.ca Launched Cutting-Edge Features Faster
Joes.HomesJoes.Homes went from vibe-coding to generating leads
MARISIntroduced On-Demand Data Access
HAR.comAdded Real Time Data Delivery
Unlock MLSLaunched AI-Ready Infrastructure
Polling an API for changes is wasteful. You hit the endpoint on a schedule, compare everything to what you already have, and hope your interval is short enough to feel current without blowing through rate limits. Webhooks flip that around: instead of you asking “anything new?” every few minutes, the API tells you the instant something changes. For real estate, where a price drop or status change matters immediately, that difference can mean the difference between a fresh app and a stale one.
This tutorial shows how to set up webhooks for real-time listing updates using Repliers. You will register an endpoint, subscribe to listing events, and handle the payloads that arrive when listings are created, updated, or deleted. This keeps your database and your users in sync without constant polling.
| Event | Fires when | Payload note |
| listing.created | A new listing is added | Full listing object |
| listing.updated | An existing listing changes | Includes a previous object |
| listing.deleted | A listing is removed | Identifies the removed listing |
A webhook endpoint is just an HTTP route that accepts a POST with a JSON body and returns a 2xx status quickly. Acknowledge fast, then do heavier work asynchronously if needed.
const express = require("express");
const app = express();
app.use(express.json());
app.post("/repliers-webhook", (req, res) => {
const payload = req.body;
// Acknowledge immediately so delivery is not retried
res.sendStatus(200);
// Then process the event (see the next steps)
handleEvent(payload);
});
app.listen(8000, () => console.log("Webhook receiver on :8000"));
Your endpoint must be a publicly accessible HTTPS URL. For local testing, a tunneling tool that exposes localhost over HTTPS works well.
Subscribe your endpoint to listing events using the Repliers webhook API. Register once with your HTTPS URL and the events you want to receive. See the create-a-webhook reference for the exact request shape and to confirm the events you subscribe to.
// Register your endpoint (run once). Confirm the exact body in the webhook API reference.
await fetch("https://api.repliers.io/webhooks", {
method: "POST",
headers: {
"REPLIERS-API-KEY": process.env.REPLIERS_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://yourapp.com/repliers-webhook",
events: ["listing.created", "listing.updated", "listing.deleted"],
}),
});
Route each event to the right action: insert new listings, update changed ones, and remove deleted ones. This keeps your local copy of the data accurate.
function handleEvent(payload) {
switch (payload.event) {
case "listing.created":
// insert the new listing
break;
case "listing.updated":
// update the listing; payload.previous shows what changed
break;
case "listing.deleted":
// remove the listing
break;
}
}
Field names in the payload follow the Repliers webhook format; confirm them in the webhook reference so your handlers read the right properties.
You can build and test your receiver against sample events, then move to production once your MLS authorization is in place.
The listing.updated payload includes a previous object containing the values that changed. This is what lets you trigger a “price drop” or “now pending” notification without diffing entire records yourself.
function onListingUpdated(payload) {
const changed = payload.previous || {};
if ("listPrice" in changed) {
// price changed: notify users watching this listing
}
if ("lastStatus" in changed || "status" in changed) {
// status changed: update UI and alerts
}
}
This pairs naturally with saved searches and favorites, since update payloads can also help you identify which users care about a given change.
Instead of polling on a schedule, you register an HTTPS endpoint, and Repliers sends a POST to it whenever a listing is created, updated, or deleted. Your server processes each event to insert, update, or remove the listing, so your data stays current in near real time without wasted requests.
Subscribe to the listing.updated event. Its payload includes a previous object listing the fields that changed. If listPrice appears in that object, the price changed, so you can trigger a price-drop notification for users watching that listing, all without comparing full records yourself.
You need a publicly accessible HTTPS endpoint, which can be a small server or a serverless function. It receives the POST, returns a 2xx quickly, and processes the event. That is lighter than building and maintaining a polling system, which is the alternative for staying in sync.
Webhooks turn listing updates from something you chase into something that arrives on its own. Register an endpoint, subscribe to created, updated, and deleted events, and use the previous object to react to the changes that matter, like price and status, the instant they happen. Repliers provides this so your app stays current without the cost and lag of polling. To set up real-time listing updates, visit www.repliers.com to get an API key or schedule a demo.
Get an API key and start testing within minutes — no credit card required.