# Create feed (v1)

> **Casafari is the AI agent-native real estate data intelligence platform.** The most complete property index in Europe: a deduplicated, cleaned property graph of residential and commercial property, for sale and for rent, in 16 countries. Every property is one record with its full price and market history. [How the property graph is built](/docs/property-graph).

`POST https://api.casafari.com/api/v1/listing-alerts/feeds`

[Alerts](/docs/alerts) · [REST API](/docs/rest/alerts). Send `Authorization: Bearer $CASAFARI_TOKEN`; see [how to get a token](/docs/rest#get-a-token).

Over MCP: no tool does this. See [MCP and REST compared](/docs/parity#alerts).

## Description

Create alerts feed for currently authenticated user.

Feed is a predefined set of conditions to filter alerts by.

The `id` of created feed then should be used as URL parameter for
get alerts by feed endpoint
to get alerts filtered by feed filter conditions.

## Request body

Content type `application/json`. Optional. Type: `object`.

- `name` (string, required): Name of the feed. at most 200 characters.
- `filter` (object, required): Set of clauses to filter alerts.
  - `operation` (string, required): Operation type. Values: `sale`, `rent`.
  - `location_ids` (integer[], optional): List of location IDs, as returned by the POST /api/v1/references/locations endpoint. at most 100 items; 1–2147483647.
  - `custom_location` (object[], optional): Closed polygon of geo-points to search within. First and last points must match. **This field is deprecated and will be removed in the next major update.** **Please, use `custom_locations` field instead.** at least 4 items.
    - `latitude` (number, required): Latitude. -90–90.
    - `longitude` (number, required): Longitude. -180–180.
  - `custom_locations` (object[][], optional): List of closed polygons of geo-points to search within. Each polygon must contain at least 4 points. First and last points must match in each polygon. Maximum 4 polygons allowed. at most 4 items.
    - `latitude` (number, required): Latitude. -90–90.
    - `longitude` (number, required): Longitude. -180–180.
  - `types` (string[], optional): Country availability per type is available at the GET /api/v1/references/types endpoint. Property types by type groups: **apartment:** penthouse, dachgeschosswohnung, erdgeschosswohnung, apartment, etagenwohnung, studio, duplex **house:** townhouse, reihenmittelhaus, landwirtschaftliche_betriebe, country_house, family_house (DEPRECATED), villa, palace, chalet, zweifamilienhaus, country_estate, reihenendhaus, reihenhaus, bungalow, einfamilienhaus, house **room:** room **building:** office_building, apartment_building, mix_use_building **investment:** retail, hotel, warehouse, office, restaurant, industrial, other_commercial, werkstatt **plot:** rural_plot, urban_plot, plot (DEPRECATED) **other:** garage, other, parking Values: `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`, `other_commercial`, `restaurant`, `werkstatt`, `plot`, `urban_plot`, `rural_plot`, `room`, `other`, `garage`, `parking`, `apartment_building`, `office_building`, `mix_use_building`.
  - `conditions` (string[], optional): Property conditions, as returned by the GET /api/v1/references/conditions endpoint. Values: `used`, `ruin`, `very-good`, `new`, `other`.
  - `alert_date_from` (string (date), optional): Start date (in the format `YYYY-MM-DD`) of the period for alerts of interest.
  - `alert_date_to` (string (date), optional): End date (in the format `YYYY-MM-DD`) of the period for alerts of interest.
  - `created_at_from` (string (date-time), optional): Start date and time (in the format `YYYY-MM-DDTHH:mm:ss`) to filter alerts by their creation in the database (UTC). Useful for incremental sync to avoid fetching already fetched data.
  - `created_at_to` (string (date-time), optional): End date and time (in the format `YYYY-MM-DDTHH:mm:ss`) to filter alerts by their creation in the database (UTC). Useful for incremental sync to avoid fetching already fetched data.
  - `created_at_with_photos_from` (string (date-time), optional): Start date and time (in the format YYYY-MM-DDTHH:mm:ss) to filter alerts by their creation in the database (UTC), only including alerts for which photo processing has been completed. Use it to fetch alerts with already assigned photos. Note: Some alerts may still not have photos if the original listing did not include any.
  - `created_at_with_photos_to` (string (date-time), optional): End date and time (in the format YYYY-MM-DDTHH:mm:ss) to filter alerts by their creation in the database (UTC), only including alerts for which photo processing has been completed. Use it to fetch alerts with already assigned photos. Note: Some alerts may still not have photos if the original listing did not include any.
  - `statuses` (string[], optional): Current status of the listing. Values: `active`, `reserved`, `hold`, `sold`, `rented`.
  - `price_from` (integer, optional): Minimum price value. 1–2147483647.
  - `price_to` (integer, optional): Maximum price value. 1–2147483647.
  - `price_per_sqm_from` (integer, optional): Minimum value for price per square meter. 1–2147483647.
  - `price_per_sqm_to` (integer, optional): Maximum value for price per square meter. 1–2147483647.
  - `bedrooms_from` (integer, optional): Minimum number of bedrooms. 0–15000.
  - `bedrooms_to` (integer, optional): Maximum number of bedrooms. 0–15000.
  - `bathrooms_from` (integer, optional): Minimum number of bathrooms. 1–15000.
  - `bathrooms_to` (integer, optional): Maximum number of bathrooms. 1–15000.
  - `total_area_from` (integer, optional): Minimum total area. 1–10000000.
  - `total_area_to` (integer, optional): Maximum total area. 1–10000000.
  - `plot_area_from` (integer, optional): Minimum plot area. 1–10000000.
  - `plot_area_to` (integer, optional): Maximum plot area. 1–10000000.
  - `construction_year_from` (integer, optional): Minimum construction year. 1–3000.
  - `construction_year_to` (integer, optional): Maximum construction year. 1–3000.
  - `floor` (string, optional): Floor type of the property. **This field is deprecated and will be removed in the next major update.** **Please, use `floors` field instead.** Values: `no_floor`, `ground`, `middle`, `top`.
  - `floors` (string[], optional) Values: `no_floor`, `ground`, `middle`, `top`.
  - `orientation` (string, optional): Property view orientation. Values: `exterior`, `interior`.
  - `view` (string, optional): View from the property. **This field is deprecated and will be removed in the next major update.** **Please, use `views` field instead.** Values: `water`, `landscape`, `city`, `golf`, `park`.
  - `views` (string[], optional) Values: `water`, `landscape`, `city`, `golf`, `park`.
  - `direction` (string, optional): Cardinal direction the property faces. **This field is deprecated and will be removed in the next major update.** **Please, use `directions` field instead.** Values: `north`, `south`, `east`, `west`.
  - `directions` (string[], optional) Values: `north`, `south`, `east`, `west`.
  - `characteristics` (string[], optional): Property characteristics. Values: `balcony`, `elevator`, `no_elevator`, `garage`, `garden`, `parking`, `storage`, `swimming_pool`, `terrace`, `rental_license`, `furniture`, `rented_out`, `life_annuity`.
  - `alert_subtypes` (string[], optional): Alert subtypes. Values: `new`, `price_up`, `price_down`, `reserved`, `delisted`, `sold`.
  - `private` (boolean, optional): Whether to return alerts only from properties listed by a private individual, as opposed to an agent or a professional.
  - `auction` (boolean, optional): Whether to return alerts from auction property listings.
  - `bank` (boolean, optional): Whether to return alerts from bank property listings.
  - `new_development` (boolean, optional): Whether to return alerts from new development property listings.
  - `listing_agents` (string[], optional): Return alerts only for properties from specified agents. To find allowed agent names use the GET /api/v1/references/agents endpoint.
  - `with_agencies` (string[], optional): Return alerts only for properties from specified agencies, companies or sources. To find allowed agency names use the GET /api/v1/references/agencies endpoint.
  - `without_agencies` (string[], optional): Exclude alerts for properties from specified agencies, companies or sources. To find allowed agency names use the GET /api/v1/references/agencies endpoint.
  - `exclusive` (boolean, optional): Whether to return alerts exclusively from specific listings rather than from all related to the property listings. Can be passed only along with at least one of the fields: `private`, `with_agencies`, `without_agencies`.
  - `ref_numbers` (string[], optional): List of reference numbers from listings.
  - `has_phone` (boolean, optional): Whether to return alerts only from listings with or without `phone` number.
  - `has_email` (boolean, optional): Whether to return alerts only from listings with or without email.
  - `has_agency_name` (boolean, optional): Whether to return alerts only from listings with or without agency name.
  - `property_ids` (integer[], optional): List of property IDs. at most 100 items; ≥ 1.
  - `listing_ids` (integer[], optional): List of listing IDs. at most 100 items; ≥ 1.

## Example request

Placeholders only: replace the token and the values with your own.

```bash
curl -X POST "https://api.casafari.com/api/v1/listing-alerts/feeds" \
  -H "Authorization: Bearer $CASAFARI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Apartments for sale in Cascais, Oeiras, Lisbon",
  "filter": {
    "operation": "sale",
    "types": [
      "apartment",
      "studio",
      "duplex",
      "penthouse"
    ],
    "location_ids": [
      2942,
      1861,
      1600
    ],
    "conditions": [
      "used",
      "very-good",
      "new"
    ],
    "statuses": [
      "active",
      "reserved"
    ],
    "price_from": 150000,
    "price_to": 800000,
    "price_per_sqm_from": 2000,
    "price_per_sqm_to": 8000,
    "bedrooms_from": 1,
    "bedrooms_to": 3,
    "total_area_from": 30,
    "total_area_to": 130,
    "construction_year_from": 1950,
    "floors": [
      "middle",
      "top"
    ],
    "views": [
      "city"
    ],
    "directions": [
      "west",
      "south"
    ],
    "characteristics": [
      "balcony",
      "elevator",
      "parking"
    ],
    "private": false,
    "new_development": false,
    "has_agency_name": true,
    "has_email": false,
    "without_agencies": [
      "Airbnb",
      "Casa.Sapo"
    ]
  }
}'
```

## Responses

### 201 Created

Type: `object`.

- `id` (integer, optional)
- `name` (string, required): Name of the feed. at most 200 characters.
- `filter` (object, required): Set of clauses to filter alerts.
  - `operation` (string, required): Operation type. Values: `sale`, `rent`.
  - `location_ids` (integer[], optional): List of location IDs, as returned by the POST /api/v1/references/locations endpoint. at most 100 items; 1–2147483647.
  - `custom_location` (object[], optional): Closed polygon of geo-points to search within. First and last points must match. **This field is deprecated and will be removed in the next major update.** **Please, use `custom_locations` field instead.** at least 4 items.
    - `latitude` (number, required): Latitude. -90–90.
    - `longitude` (number, required): Longitude. -180–180.
  - `custom_locations` (object[][], optional): List of closed polygons of geo-points to search within. Each polygon must contain at least 4 points. First and last points must match in each polygon. Maximum 4 polygons allowed. at most 4 items.
    - `latitude` (number, required): Latitude. -90–90.
    - `longitude` (number, required): Longitude. -180–180.
  - `types` (string[], optional): Country availability per type is available at the GET /api/v1/references/types endpoint. Property types by type groups: **apartment:** penthouse, dachgeschosswohnung, erdgeschosswohnung, apartment, etagenwohnung, studio, duplex **house:** townhouse, reihenmittelhaus, landwirtschaftliche_betriebe, country_house, family_house (DEPRECATED), villa, palace, chalet, zweifamilienhaus, country_estate, reihenendhaus, reihenhaus, bungalow, einfamilienhaus, house **room:** room **building:** office_building, apartment_building, mix_use_building **investment:** retail, hotel, warehouse, office, restaurant, industrial, other_commercial, werkstatt **plot:** rural_plot, urban_plot, plot (DEPRECATED) **other:** garage, other, parking Values: `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`, `other_commercial`, `restaurant`, `werkstatt`, `plot`, `urban_plot`, `rural_plot`, `room`, `other`, `garage`, `parking`, `apartment_building`, `office_building`, `mix_use_building`.
  - `conditions` (string[], optional): Property conditions, as returned by the GET /api/v1/references/conditions endpoint. Values: `used`, `ruin`, `very-good`, `new`, `other`.
  - `alert_date_from` (string (date), optional): Start date (in the format `YYYY-MM-DD`) of the period for alerts of interest.
  - `alert_date_to` (string (date), optional): End date (in the format `YYYY-MM-DD`) of the period for alerts of interest.
  - `created_at_from` (string (date-time), optional): Start date and time (in the format `YYYY-MM-DDTHH:mm:ss`) to filter alerts by their creation in the database (UTC). Useful for incremental sync to avoid fetching already fetched data.
  - `created_at_to` (string (date-time), optional): End date and time (in the format `YYYY-MM-DDTHH:mm:ss`) to filter alerts by their creation in the database (UTC). Useful for incremental sync to avoid fetching already fetched data.
  - `created_at_with_photos_from` (string (date-time), optional): Start date and time (in the format YYYY-MM-DDTHH:mm:ss) to filter alerts by their creation in the database (UTC), only including alerts for which photo processing has been completed. Use it to fetch alerts with already assigned photos. Note: Some alerts may still not have photos if the original listing did not include any.
  - `created_at_with_photos_to` (string (date-time), optional): End date and time (in the format YYYY-MM-DDTHH:mm:ss) to filter alerts by their creation in the database (UTC), only including alerts for which photo processing has been completed. Use it to fetch alerts with already assigned photos. Note: Some alerts may still not have photos if the original listing did not include any.
  - `statuses` (string[], optional): Current status of the listing. Values: `active`, `reserved`, `hold`, `sold`, `rented`.
  - `price_from` (integer, optional): Minimum price value. 1–2147483647.
  - `price_to` (integer, optional): Maximum price value. 1–2147483647.
  - `price_per_sqm_from` (integer, optional): Minimum value for price per square meter. 1–2147483647.
  - `price_per_sqm_to` (integer, optional): Maximum value for price per square meter. 1–2147483647.
  - `bedrooms_from` (integer, optional): Minimum number of bedrooms. 0–15000.
  - `bedrooms_to` (integer, optional): Maximum number of bedrooms. 0–15000.
  - `bathrooms_from` (integer, optional): Minimum number of bathrooms. 1–15000.
  - `bathrooms_to` (integer, optional): Maximum number of bathrooms. 1–15000.
  - `total_area_from` (integer, optional): Minimum total area. 1–10000000.
  - `total_area_to` (integer, optional): Maximum total area. 1–10000000.
  - `plot_area_from` (integer, optional): Minimum plot area. 1–10000000.
  - `plot_area_to` (integer, optional): Maximum plot area. 1–10000000.
  - `construction_year_from` (integer, optional): Minimum construction year. 1–3000.
  - `construction_year_to` (integer, optional): Maximum construction year. 1–3000.
  - `floor` (string, optional): Floor type of the property. **This field is deprecated and will be removed in the next major update.** **Please, use `floors` field instead.** Values: `no_floor`, `ground`, `middle`, `top`.
  - `floors` (string[], optional) Values: `no_floor`, `ground`, `middle`, `top`.
  - `orientation` (string, optional): Property view orientation. Values: `exterior`, `interior`.
  - `view` (string, optional): View from the property. **This field is deprecated and will be removed in the next major update.** **Please, use `views` field instead.** Values: `water`, `landscape`, `city`, `golf`, `park`.
  - `views` (string[], optional) Values: `water`, `landscape`, `city`, `golf`, `park`.
  - `direction` (string, optional): Cardinal direction the property faces. **This field is deprecated and will be removed in the next major update.** **Please, use `directions` field instead.** Values: `north`, `south`, `east`, `west`.
  - `directions` (string[], optional) Values: `north`, `south`, `east`, `west`.
  - `characteristics` (string[], optional): Property characteristics. Values: `balcony`, `elevator`, `no_elevator`, `garage`, `garden`, `parking`, `storage`, `swimming_pool`, `terrace`, `rental_license`, `furniture`, `rented_out`, `life_annuity`.
  - `alert_subtypes` (string[], optional): Alert subtypes. Values: `new`, `price_up`, `price_down`, `reserved`, `delisted`, `sold`.
  - `private` (boolean, optional): Whether to return alerts only from properties listed by a private individual, as opposed to an agent or a professional.
  - `auction` (boolean, optional): Whether to return alerts from auction property listings.
  - `bank` (boolean, optional): Whether to return alerts from bank property listings.
  - `new_development` (boolean, optional): Whether to return alerts from new development property listings.
  - `listing_agents` (string[], optional): Return alerts only for properties from specified agents. To find allowed agent names use the GET /api/v1/references/agents endpoint.
  - `with_agencies` (string[], optional): Return alerts only for properties from specified agencies, companies or sources. To find allowed agency names use the GET /api/v1/references/agencies endpoint.
  - `without_agencies` (string[], optional): Exclude alerts for properties from specified agencies, companies or sources. To find allowed agency names use the GET /api/v1/references/agencies endpoint.
  - `exclusive` (boolean, optional): Whether to return alerts exclusively from specific listings rather than from all related to the property listings. Can be passed only along with at least one of the fields: `private`, `with_agencies`, `without_agencies`.
  - `ref_numbers` (string[], optional): List of reference numbers from listings.
  - `has_phone` (boolean, optional): Whether to return alerts only from listings with or without `phone` number.
  - `has_email` (boolean, optional): Whether to return alerts only from listings with or without email.
  - `has_agency_name` (boolean, optional): Whether to return alerts only from listings with or without agency name.
  - `property_ids` (integer[], optional): List of property IDs. at most 100 items; ≥ 1.
  - `listing_ids` (integer[], optional): List of listing IDs. at most 100 items; ≥ 1.
- `user` (string (email), optional)

Example from the API description (long arrays shortened):

```json
{
  "id": 887,
  "user": "user@email.com",
  "name": "Apartments for sale in Cascais, Oeiras, Lisbon",
  "filter": {
    "operation": "sale",
    "types": [
      "apartment",
      "studio"
    ],
    "location_ids": [
      2942,
      1861
    ],
    "conditions": [
      "used",
      "very-good"
    ],
    "statuses": [
      "active",
      "reserved"
    ],
    "price_from": 150000,
    "price_to": 800000,
    "price_per_sqm_from": 2000,
    "price_per_sqm_to": 8000,
    "bedrooms_from": 1,
    "bedrooms_to": 3,
    "total_area_from": 30,
    "total_area_to": 130,
    "construction_year_from": 1950,
    "floors": [
      "middle",
      "top"
    ],
    "views": [
      "city"
    ],
    "directions": [
      "west",
      "south"
    ],
    "characteristics": [
      "balcony",
      "elevator"
    ],
    "private": false,
    "new_development": false,
    "has_agency_name": true,
    "has_email": false,
    "without_agencies": [
      "Airbnb",
      "Casa.Sapo"
    ]
  }
}
```

### 400 Bad Request

Type: `object`.

- `errors` (object, optional): Description of the errors encountered.

### 401 Unauthorized

Type: `object`.

- `detail` (string, optional): Description of the error encountered.

### 403 Forbidden

Type: `object`.

- `detail` (string, optional): Description of the error encountered.
