Create feed
https://api.casafari.com/alerts-api/feedsLegacy API (api.casafari.com). Una ruta de la API existente para clientes de Casafari con contrato, no de la plataforma. En la plataforma: todavía no hay ruta de plataforma.
En la Legacy API en https://api.casafari.com (clientes con contrato): envíe Authorization: Bearer $CASAFARI_TOKEN; consulte cómo obtener un token. Nuevos usuarios: la API REST de la plataforma, claves de API de plataforma.
Description
Create a new alert feed that delivers matching real estate events to your webhook URL.
Alert Delivery Format
Events are delivered as a POST request with a single JSON object body:
{
"alert_id": 100042,
"url": "https://www.casafari.com/listing/12345",
"address": "Rua do Exemplo 12, Lisbon",
"location": "Lisbon",
"sale_status": "active",
"sale_price": 250000,
"sale_price_psqm": 2500.0,
"sale_currency": "EUR",
"rent_status": "none",
"rent_price": 0,
"rent_period": "none",
"rent_price_psqm": 0.0,
"rent_currency": "EUR",
"thumbnails": [
"https://cdn.example.com/thumb1.jpg"
],
"matched_feeds": [
{
"feed_id": 42,
"feed_name": "My Alert Feed"
}
]
}Your server must respond with HTTP 200. Any other status code is treated as a failure.
Before You Start: Configure Your Webhook
Feeds deliver to your per-user webhook URL — one URL for all feeds, managed separately:
PUT /webhooks— set your delivery URL (it is probed with a GET and must answer 200)- Create feeds — this endpoint returns 409 until the webhook is configured
Changing the URL via PUT /webhooks instantly affects all feeds, including already-queued alerts.
Retry Policy
If your server does not respond with HTTP 200 within 5 seconds, delivery is retried — 60 seconds after the first failure, then every 10 minutes — until the alert expires (typically 24h). Feeds are never disabled automatically.
Authentication of deliveries
Every delivery is signed with Standard Webhooks: each POST
carries webhook-id, webhook-timestamp, and webhook-signature headers. Verify the
HMAC-SHA256 signature over the raw request body using the secret from PUT /webhooks
(rotate it via POST /webhooks/rotate-secret).
Cuerpo de la solicitud
Tipo de contenido application/json. Obligatorio. Tipo: object.
feed_namestringobligatoriofiltersobjectobligatorio28 properties
location_idsinteger[]nullabletypesstring[]nullable42 valores permitidos
apartment studio duplex penthouse dachgeschosswohnung etagenwohnung erdgeschosswohnung country_house house palace townhouse villa country_estate chalet bungalow family_house reihenhaus reihenendhaus reihenmittelhaus einfamilienhaus zweifamilienhaus landwirtschaftliche_betriebe retail office industrial warehouse hotel building other_commercial restaurant werkstatt urban_plot rural_plot room parking garage other apartment_building office_building mix_use_building apartment_development house_developmentbusiness_typestringobligatoriosale rentstatuses(string | string)[]nullablealert_subtypesstring[]nullablenew price_increased price_decreased reserved delisted soldcustom_locationsobject[][]nullable2 propiedades
latitudenumberobligatoriolongitudenumberobligatorioprivatebooleannullableprice_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullableprice_psqm_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablebathrooms_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablebedrooms_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullabletotal_area_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablenew_developmentbooleannullablebankbooleannullableauctionbooleannullableconstruction_year_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullableplot_area_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablefloorsstring[]nullableno_floor ground middle topconditionsstring[]nullablenew used ruin very-good otherorientationstringnullableexterior interiorviewsstring[]nullablewater landscape city golf parkdirectionsstring[]nullablenorth south east westcharacteristicsstring[]nullablebalcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityhas_phonebooleannullablehas_emailbooleannullablehas_agency_namebooleannullableref_numbersstring[]nullablelisting_idsinteger[]nullableEjemplo de solicitud
Solo marcadores de posición: reemplace el token y los valores por los suyos.
curl -X POST "https://api.casafari.com/alerts-api/feeds" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"feed_name": "<feed_name>",
"filters": {
"business_type": "sale"
}
}'Respuestas
200 Respuesta correcta
Tipo: object.
Show the response shape (47 fields)
feed_idintegerobligatoriofeed_namestringobligatoriofiltersobjectobligatorio28 properties
location_idsinteger[]nullabletypesstring[]nullable42 valores permitidos
apartment studio duplex penthouse dachgeschosswohnung etagenwohnung erdgeschosswohnung country_house house palace townhouse villa country_estate chalet bungalow family_house reihenhaus reihenendhaus reihenmittelhaus einfamilienhaus zweifamilienhaus landwirtschaftliche_betriebe retail office industrial warehouse hotel building other_commercial restaurant werkstatt urban_plot rural_plot room parking garage other apartment_building office_building mix_use_building apartment_development house_developmentbusiness_typestringobligatoriosale rentstatuses(string | string)[]nullablealert_subtypesstring[]nullablenew price_increased price_decreased reserved delisted soldcustom_locationsobject[][]nullable2 propiedades
latitudenumberobligatoriolongitudenumberobligatorioprivatebooleannullableprice_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullableprice_psqm_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablebathrooms_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablebedrooms_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullabletotal_area_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablenew_developmentbooleannullablebankbooleannullableauctionbooleannullableconstruction_year_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullableplot_area_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablefloorsstring[]nullableno_floor ground middle topconditionsstring[]nullablenew used ruin very-good otherorientationstringnullableexterior interiorviewsstring[]nullablewater landscape city golf parkdirectionsstring[]nullablenorth south east westcharacteristicsstring[]nullablebalcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityhas_phonebooleannullablehas_emailbooleannullablehas_agency_namebooleannullableref_numbersstring[]nullablelisting_idsinteger[]nullable409 Webhook is not configured.
Tipo: object.
Mostrar la estructura de la respuesta (1 campo)
detailstringobligatorioEjemplo de la descripción de la API
{
"detail": "No webhook configured. Set your delivery URL via PUT /webhooks first."
}422 Error de validación
Tipo: object.
Mostrar la estructura de respuesta (6 campos)
detailobject[]5 propiedades
loc(string | integer)[]obligatoriomsgstringobligatoriotypestringobligatorioinputanyctxobject