---
title: "Create feed (v1)"
method: POST
path: "/api/v1/listing-alerts/feeds"
tags: ["api---alerts"]
---

# Create feed (v1)

`POST /api/v1/listing-alerts/feeds`

## Request

- Base URL: `https://api.casafari.com`
- URL: `https://api.casafari.com/api/v1/listing-alerts/feeds`
- Auth: HTTP bearer

Create alerts feed for currently authenticated user.<br/>
    Feed is a predefined set of conditions to filter alerts by.<br/>
    The `id` of created feed then should be used as URL parameter for
    [get alerts by feed](/#operation/getAlertsFeed) endpoint
    to get alerts filtered by feed filter conditions.

## Request body

- ApiAlertsFeedV1
  - `id` integer
  - `name` string, required: Name of the feed.
  - `filter` object, required: Set of clauses to filter alerts.
    - `operation` 'sale' | 'rent', required: Operation type.
    - `location_ids` integer[]: List of location IDs, as returned by the [POST /api/v1/references/locations](/#operation/api__post__v1__references__locations) endpoint.
    - `custom_location` object[]: Closed polygon of geo-points to search within. First and last points must match.<br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `custom_locations` field instead.</strong>
      - `latitude` number, required: Latitude.
      - `longitude` number, required: Longitude.
    - `custom_locations` array[]: 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.
      - object[]
        - `latitude` number, required: Latitude.
        - `longitude` number, required: Longitude.
    - `types` string[]: <br>Country availability per type is available at the [GET /api/v1/references/types](/#operation/api__get__v1__references__types) endpoint.<br><br>Property types by type groups:<br/><strong>apartment:</strong> penthouse, dachgeschosswohnung, erdgeschosswohnung, apartment, etagenwohnung, studio, duplex<br/><strong>house:</strong> townhouse, reihenmittelhaus, landwirtschaftliche_betriebe, country_house, family_house (<span style="color:red">DEPRECATED</span>), villa, palace, chalet, zweifamilienhaus, country_estate, reihenendhaus, reihenhaus, bungalow, einfamilienhaus, house<br/><strong>room:</strong> room<br/><strong>building:</strong> office_building, apartment_building, mix_use_building<br/><strong>investment:</strong> retail, hotel, warehouse, office, restaurant, industrial, other_commercial, werkstatt<br/><strong>plot:</strong> rural_plot, urban_plot, plot (<span style="color:red">DEPRECATED</span>)<br/><strong>other:</strong> garage, other, parking
    - `conditions` string[]: Property conditions, as returned by the [GET /api/v1/references/conditions](/#operation/api__get__v1__references__conditions) endpoint.
    - `alert_date_from` string, date: Start date (in the format `YYYY-MM-DD`) of the period for alerts of interest.
    - `alert_date_to` string, date: End date (in the format `YYYY-MM-DD`) of the period for alerts of interest.
    - `created_at_from` string, date-time: 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: 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: 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: 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[]: Current status of the listing.
    - `price_from` integer: Minimum price value.
    - `price_to` integer: Maximum price value.
    - `price_per_sqm_from` integer: Minimum value for price per square meter.
    - `price_per_sqm_to` integer: Maximum value for price per square meter.
    - `bedrooms_from` integer: Minimum number of bedrooms.
    - `bedrooms_to` integer: Maximum number of bedrooms.
    - `bathrooms_from` integer: Minimum number of bathrooms.
    - `bathrooms_to` integer: Maximum number of bathrooms.
    - `total_area_from` integer: Minimum total area.
    - `total_area_to` integer: Maximum total area.
    - `plot_area_from` integer: Minimum plot area.
    - `plot_area_to` integer: Maximum plot area.
    - `construction_year_from` integer: Minimum construction year.
    - `construction_year_to` integer: Maximum construction year.
    - `floor` 'no_floor' | 'ground' | 'middle' | 'top': Floor type of the property. <br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `floors` field instead.</strong>
    - `floors` string[]
    - `orientation` 'exterior' | 'interior': Property view orientation.
    - `view` 'water' | 'landscape' | 'city' | 'golf' | 'park': View from the property. <br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `views` field instead.</strong>
    - `views` string[]
    - `direction` 'north' | 'south' | 'east' | 'west': Cardinal direction the property faces. <br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `directions` field instead.</strong>
    - `directions` string[]
    - `characteristics` string[]: Property characteristics.
    - `alert_subtypes` string[]: Alert subtypes.
    - `private` boolean: Whether to return alerts only from properties listed by a private individual, as opposed to an agent or a professional.
    - `auction` boolean: Whether to return alerts from auction property listings.
    - `bank` boolean: Whether to return alerts from bank property listings.
    - `new_development` boolean: Whether to return alerts from new development property listings.
    - `listing_agents` string[]: Return alerts only for properties from specified agents. To find allowed agent names use the [GET /api/v1/references/agents](/#operation/api__get__v1__references__agents) endpoint.
    - `with_agencies` string[]: Return alerts only for properties from specified agencies, companies or sources. To find allowed agency names use the [GET /api/v1/references/agencies](/#operation/api__get__v1__references__agencies) endpoint.
    - `without_agencies` string[]: Exclude alerts for properties from specified agencies, companies or sources. To find allowed agency names use the [GET /api/v1/references/agencies](/#operation/api__get__v1__references__agencies) endpoint.
    - `exclusive` boolean: Whether to return alerts exclusively from specific listings rather than from all related to the property listings.<br/>Can be passed only along with at least one of the fields: `private`, `with_agencies`, `without_agencies`.
    - `ref_numbers` string[]: List of reference numbers from listings.
    - `has_phone` boolean: Whether to return alerts only from listings with or without `phone` number.
    - `has_email` boolean: Whether to return alerts only from listings with or without email.
    - `has_agency_name` boolean: Whether to return alerts only from listings with or without agency name.
    - `property_ids` integer[]: List of property IDs.
    - `listing_ids` integer[]: List of listing IDs.
  - `user` string, email

## Response `201`

- ApiAlertsFeedV1
  - `id` integer
  - `name` string, required: Name of the feed.
  - `filter` object, required: Set of clauses to filter alerts.
    - `operation` 'sale' | 'rent', required: Operation type.
    - `location_ids` integer[]: List of location IDs, as returned by the [POST /api/v1/references/locations](/#operation/api__post__v1__references__locations) endpoint.
    - `custom_location` object[]: Closed polygon of geo-points to search within. First and last points must match.<br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `custom_locations` field instead.</strong>
      - `latitude` number, required: Latitude.
      - `longitude` number, required: Longitude.
    - `custom_locations` array[]: 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.
      - object[]
        - `latitude` number, required: Latitude.
        - `longitude` number, required: Longitude.
    - `types` string[]: <br>Country availability per type is available at the [GET /api/v1/references/types](/#operation/api__get__v1__references__types) endpoint.<br><br>Property types by type groups:<br/><strong>apartment:</strong> penthouse, dachgeschosswohnung, erdgeschosswohnung, apartment, etagenwohnung, studio, duplex<br/><strong>house:</strong> townhouse, reihenmittelhaus, landwirtschaftliche_betriebe, country_house, family_house (<span style="color:red">DEPRECATED</span>), villa, palace, chalet, zweifamilienhaus, country_estate, reihenendhaus, reihenhaus, bungalow, einfamilienhaus, house<br/><strong>room:</strong> room<br/><strong>building:</strong> office_building, apartment_building, mix_use_building<br/><strong>investment:</strong> retail, hotel, warehouse, office, restaurant, industrial, other_commercial, werkstatt<br/><strong>plot:</strong> rural_plot, urban_plot, plot (<span style="color:red">DEPRECATED</span>)<br/><strong>other:</strong> garage, other, parking
    - `conditions` string[]: Property conditions, as returned by the [GET /api/v1/references/conditions](/#operation/api__get__v1__references__conditions) endpoint.
    - `alert_date_from` string, date: Start date (in the format `YYYY-MM-DD`) of the period for alerts of interest.
    - `alert_date_to` string, date: End date (in the format `YYYY-MM-DD`) of the period for alerts of interest.
    - `created_at_from` string, date-time: 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: 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: 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: 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[]: Current status of the listing.
    - `price_from` integer: Minimum price value.
    - `price_to` integer: Maximum price value.
    - `price_per_sqm_from` integer: Minimum value for price per square meter.
    - `price_per_sqm_to` integer: Maximum value for price per square meter.
    - `bedrooms_from` integer: Minimum number of bedrooms.
    - `bedrooms_to` integer: Maximum number of bedrooms.
    - `bathrooms_from` integer: Minimum number of bathrooms.
    - `bathrooms_to` integer: Maximum number of bathrooms.
    - `total_area_from` integer: Minimum total area.
    - `total_area_to` integer: Maximum total area.
    - `plot_area_from` integer: Minimum plot area.
    - `plot_area_to` integer: Maximum plot area.
    - `construction_year_from` integer: Minimum construction year.
    - `construction_year_to` integer: Maximum construction year.
    - `floor` 'no_floor' | 'ground' | 'middle' | 'top': Floor type of the property. <br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `floors` field instead.</strong>
    - `floors` string[]
    - `orientation` 'exterior' | 'interior': Property view orientation.
    - `view` 'water' | 'landscape' | 'city' | 'golf' | 'park': View from the property. <br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `views` field instead.</strong>
    - `views` string[]
    - `direction` 'north' | 'south' | 'east' | 'west': Cardinal direction the property faces. <br/><strong>This field is deprecated and will be removed in the next major update.</strong><br/><strong>Please, use `directions` field instead.</strong>
    - `directions` string[]
    - `characteristics` string[]: Property characteristics.
    - `alert_subtypes` string[]: Alert subtypes.
    - `private` boolean: Whether to return alerts only from properties listed by a private individual, as opposed to an agent or a professional.
    - `auction` boolean: Whether to return alerts from auction property listings.
    - `bank` boolean: Whether to return alerts from bank property listings.
    - `new_development` boolean: Whether to return alerts from new development property listings.
    - `listing_agents` string[]: Return alerts only for properties from specified agents. To find allowed agent names use the [GET /api/v1/references/agents](/#operation/api__get__v1__references__agents) endpoint.
    - `with_agencies` string[]: Return alerts only for properties from specified agencies, companies or sources. To find allowed agency names use the [GET /api/v1/references/agencies](/#operation/api__get__v1__references__agencies) endpoint.
    - `without_agencies` string[]: Exclude alerts for properties from specified agencies, companies or sources. To find allowed agency names use the [GET /api/v1/references/agencies](/#operation/api__get__v1__references__agencies) endpoint.
    - `exclusive` boolean: Whether to return alerts exclusively from specific listings rather than from all related to the property listings.<br/>Can be passed only along with at least one of the fields: `private`, `with_agencies`, `without_agencies`.
    - `ref_numbers` string[]: List of reference numbers from listings.
    - `has_phone` boolean: Whether to return alerts only from listings with or without `phone` number.
    - `has_email` boolean: Whether to return alerts only from listings with or without email.
    - `has_agency_name` boolean: Whether to return alerts only from listings with or without agency name.
    - `property_ids` integer[]: List of property IDs.
    - `listing_ids` integer[]: List of listing IDs.
  - `user` string, email

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/casafari/apis/casafari-api.md) · [All operations](https://skmtc.dev/casafari/apis/casafari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/casafari/apis/casafari-api/revisions/6743b99d4bf9?raw)
