Stream EstateStream Estate
Concepts

Alert

Saved search with webhook delivery

An Alert is a saved search that produces AlertEvents when new listings match. Events are delivered via an EventDestination according to the configured rules.

From listing to notification

When a new or updated listing matches an alert, it produces an AlertEvent. Each event can trigger one or more notifications, delivered to the configured destination.

Listingnew or updated
matches
Alert
produces
AlertEvent
triggers
Notification
delivered to
Destinationwebhook

Attaching a destination

Two options:

  • On the fly — pass webhookUrl into POST /alerts. If a destination with that URL already exists on your account it is reused, otherwise it is created. Simplest way to get started, or to give each alert a different URL.
  • From an existing destination — create it via POST /account/event-destinations, then reference it by eventDestination. Handy when several alerts share one destination, which you then manage in a single place.
POST /alerts
{
  "name": "2-bedroom apartments in Paris",
  "notificationDestination": { "webhookUrl": "https://your-server.com/webhooks/alerts" },
  "notificationConfig": { "rules": [{ "eventType": "NEW_MATCH" }] }
}

The response carries the signingKey only if this is the first webhook destination of your account. Store it: it is never returned again.

Alert schema (response)

FieldTypeDescription
idstring (uuid)Read-only identifier
namestring | nullAlert name, surfaced in the dashboard
enabledbooleanWhether the alert is enabled (a disabled alert stops matching new listings and sends nothing)
criteriaCriteriaNode | nullRecursive criteria tree (same shape as POST /properties)
notificationConfigAlertNotificationConfig | nullNotification rules (see below)
eventDestinationstring (IRI) | nullLinked destination, e.g. /account/event-destinations/{id} (read-only)
signingKeystring | nullHMAC key for signing webhooks, prefixed whsec_. Returned once only, when the request creates the first webhook destination of your account. See Notifications.
createdAt / updatedAtstring | nullISO 8601

Request schema

POST /alerts and PUT /alerts/{uuid} share the same body. The table describes each field as POST reads it; on PUT an omitted field keeps its stored value — see Updating an alert below.

FieldTypeDescription
namestring | nullOptional on create; a name is generated from criteria when omitted. Max 255 chars.
enabledbooleanDefault true on create.
criteriaCriteriaNode | nullRecursive tree — see Filtering. Omit on create to match every property except new-build and under-construction ones — see Default scope.
notificationConfigAlertNotificationConfig | nulleventType, scope and variation-window rules. Omit on create and the alert never notifies.
notificationDestinationNotificationDestination | nullDestination — provide exactly one of the fields below. Omit on create to use your account default destination; if your account has none yet, the request is rejected with a 422. Your first destination becomes the default automatically — see Notifications.

NotificationDestination — oneOf

FieldTypeEffect
eventDestinationstring (IRI)Link an existing EventDestination, e.g. /account/event-destinations/{id}.
webhookUrlstringCreate or reuse a webhook EventDestination for this URL.

Updating an alert

PUT /alerts/{uuid} changes only the fields the body names. Each field is in one of three states:

The bodyResult
field omittedthe stored value is kept, unchanged
field sent as nullthe value is cleared: name is emptied, criteria matches every property again, notificationConfig stops every notification, notificationDestination goes back to your account default destination
field sent with a valuereplaces the stored value. criteria is replaced as a whole tree, never merged key by key

enabled is a boolean and cannot be null: omit it to keep the current value.

To widen an alert to every property, send "criteria": null explicitly. A PUT without criteria keeps the current filter.

Notification rules (AlertNotificationRule)

Each rule targets an eventType. Without a rule, an event is never sent: add one rule per event you want. One rule per eventType: a duplicate gets a 422.

FieldTypeDescription
eventTypestring (enum)Required. Which event notifies (see below).
scopePROPERTY | LISTINGDefault PROPERTY: one notification per property — an identical change published on several listings of the same property notifies once. LISTING: one notification per listing — each new listing on a property you already follow triggers its own NEW_MATCH.
variationPercent[{ gte, lte }, …]Only for PRICE_CHANGE: list of variation ranges, in percent (see below). Empty or omitted: every price change is sent.
eventTypeTrigger
NEW_MATCHA property enters your search perimeter
PRICE_CHANGEIts price changes
OTHER_CHANGEAnother attribute changes
EXPIREDThe property leaves the market
REACTIVATEDThe property returns to the market
MERGEDThe property is merged into another property, which is kept (see Merged properties)

Until 2026-10-20, a rule still carrying the former enabled field is accepted: false drops the rule, true is ignored. After that date, the field is refused with 400, like any unknown field. To stop receiving an event, remove its rule.

Variation window for PRICE_CHANGE

variationPercent is a list of ranges in percent: [{ "gte": …, "lte": … }]. A drop is negative. The rule fires as soon as one range contains the variation. Omit the list, or send [], to receive every price change. A bare object outside a list gets a 400.

NeedvariationPercent
Drop of at least 5%[{ "lte": -5 }]
Drop between 20% and 40%[{ "gte": -40, "lte": -20 }]
Rise of at least 10%[{ "gte": 10 }]
Move of at least 5% in either direction[{ "lte": -5 }, { "gte": 5 }]

Merged properties (MERGED)

Deduplication never stops: two properties can turn out to be one and the same property after they were created. They are then merged into one property, which is kept.

A MERGED rule tells you about the merge, for every property the alert already told you about:

  • scope must be PROPERTY: a MERGED rule at LISTING gets a 422.
  • data describes the kept property, and listing.id a listing of the merged property, now attached to the kept one. Attach your data to data.id.
  • The old id still resolves: GET /properties/{id} returns the kept property, with the old id in mergedFrom (meta.mergedFrom in JSON:API). See the reference.

Default scope

An alert follows the same default masks as a search, except the expired-listing one (see Default masks):

  • Incoherent prices — left out until listings.priceCoherent is set.
  • New-build and under-construction properties — left out until the criteria carry a property.constructionStatus filter holding at least one value, in any branch. An empty filter counts as absent.

To have an alert cover new-build too, add the filter to its criteria:

{
  "criteria": {
    "property": {
      "type": { "in": ["FLAT"] },
      "constructionStatus": { "inOrMissing": ["OLD", "NEW", "UNDER_CONSTRUCTION"] }
    }
  }
}

{"in": ["NEW", "UNDER_CONSTRUCTION"]} restricts the alert to new-build and under-construction properties.

An alert that already told you about a new-build property still tells you when it leaves the market (EXPIRED), but no longer of its other events (PRICE_CHANGE, OTHER_CHANGE, REACTIVATED).

Estimate the volume of an alert

Before saving an alert, send its criteria to POST /alerts/forecast to learn roughly how many notifications it would send. Nothing is saved and the call is not billed.

{
  "criteria": {
    "property": {
      "type": { "in": ["FLAT"] },
      "transaction": { "type": "RENT" },
      "pricing": { "displayed": { "lte": 2000 } },
      "locations": { "countryCode": "FR", "in": { "uniqueCodes": ["75056"] } }
    }
  }
}
{
  "windowDays": 30,
  "total": 2520,
  "perDay": { "average": 84, "low": 61, "high": 112 },
  "perHour": { "average": 3.5, "low": 1, "high": 9 }
}
  • total — the new properties that matched over the last windowDays days.
  • perDay and perHour — the average per period, and the usual range: at most one period in ten had fewer than low, at most one in ten more than high.
  • The estimate applies the default scope: with no property.constructionStatus filter, it leaves new-build out.
  • The estimate counts new properties only. In its first days, a newly saved alert also notifies the matching properties already on the market, which the estimate leaves out.
  • Criteria that POST /alerts refuses are refused here too, with a 422, and so is an unknown key in criteria. An unknown top-level key gets a 400. A 503 means the estimate could not be computed: retry later.

Endpoints

  • POST /alerts/forecast — estimate the volume of an alert before saving it
  • POST /alerts — create (response includes signingKey when it creates the first webhook destination of your account)
  • GET /alerts — list
  • GET /alerts/{uuid} — detail
  • PUT /alerts/{uuid} — update
  • DELETE /alerts/{uuid} — delete
  • GET /alerts/{alertUuid}/events — AlertEvents produced by this alert
  • GET /alerts/{alertUuid}/events/{uuid} — event detail

See also: Notifications for EventDestination and delivery.

Version 0.34.464Last updated

On this page