How to Set Up Webhooks for Real-Time Listing Updates

Published on
09 September 2026
How to Set Up Webhooks for Real-Time Listing Updates

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.

Key Takeaways

  • Webhooks push updates to your server the moment a listing changes, replacing scheduled polling and its wasted requests.
  • Repliers supports three listing events: listing.created, listing.updated, and listing.deleted.
  • On an update, the payload includes a previous object showing exactly which fields changed, so you can react to price or status changes specifically.
  • You register a public HTTPS endpoint once, then process incoming events to keep your data current.

What You Will Build

  • A public webhook endpoint that receives listing events
  • A subscription to created, updated, and deleted events
  • Handlers that update your database and detect price or status changes

What You Will Need

  • A Repliers API key
  • A publicly accessible HTTPS endpoint (a server or serverless function)
  • Basic Node.js and Express (or any HTTP framework)

Events You Can Subscribe To

EventFires whenPayload note
listing.createdA new listing is addedFull listing object
listing.updatedAn existing listing changesIncludes a previous object
listing.deletedA listing is removedIdentifies the removed listing

Step 1: Build a Webhook Receiver

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.

Step 2: Register the Webhook

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"],

  }),

});

Step 3: Handle Each Event Type

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.

Set Up Real-Time Sync

You can build and test your receiver against sample events, then move to production once your MLS authorization is in place.

Step 4: Use the previous Object for Price and Status Alerts

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.

Frequently Asked Questions

How do webhooks keep listing data up to date?

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.

How do I detect a price drop with webhooks?

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.

Do I need a backend to use webhooks?

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.

The Bottom Line

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.

Ready to get started?

Get an API key and start testing within minutes — no credit card required.