Legacy API (api.casafari.com)
The product pages and the REST API reference document the platform's routes, https://platform.casafari.com/v1/<product>. This page keeps the routes of the existing Casafari API at https://api.casafari.com, for Casafari clients with a contract who still call them. Nothing changes for them today: same base URL, same paths, same token. New integrations use the platform: sign in to the console for a platform API key.
Routes and what replaces them
Every route of the old API's public description, by product, with the platform route that does the same job where there is one. Each route keeps its own page.
Property Sourcing
| Legacy route | What it does | On the platform |
|---|---|---|
POST /api/v1/properties/match-by-listings | Get property by listing IDs (v1) | No platform route yet |
POST /api/v1/properties/search | Search properties (v1) | POST /v1/property-sourcing/searches |
GET /api/v1/properties/search/{property_id} | Get property by ID (v1) | GET /v1/property-sourcing/properties/{property_id} |
POST /api/v1/properties/smart-links | Create a smart link (BETA) (v1) | No platform route yet |
POST /api/v2/properties/search | Search properties (v2) | POST /v1/property-sourcing/searches |
Comparables & Valuation
| Legacy route | What it does | On the platform |
|---|---|---|
POST /api/v1/comparables/search | Search comparables (v1) | POST /v1/comparables/search |
POST /api/v2/comparables/ai-builder | Initialize an AI Builder session (v2) | No platform route yet |
POST /api/v2/comparables/search | Search comparables (v2) | POST /v1/comparables/search |
POST /api/v1/valuation/comparables-prices | Search estimated prices (v1) | POST /v1/comparables/search (its answer carries the estimated prices) |
Area Insights
| Legacy route | What it does | On the platform |
|---|---|---|
POST /market-analytics-api/time-series | Time Series | POST /v1/area-insights/time-series |
POST /market-analytics-api/distributions/bedrooms | Bedrooms Distribution | POST /v1/area-insights/distributions/bedrooms |
POST /market-analytics-api/distributions/prices | Price Distribution | POST /v1/area-insights/distributions/prices |
POST /market-analytics-api/distributions/properties | Properties Distribution | POST /v1/area-insights/distributions/properties |
POST /market-analytics-api/distributions/time-on-market | Time On Market Distribution | POST /v1/area-insights/distributions/time-on-market |
POST /market-analytics-api/analysis | Analysis | POST /v1/area-insights/analysis |
New Market Leads
Set your webhook first: creating a feed before a webhook is set is refused with 409 "No webhook configured". A feed is created with feed_name and filters: filters.business_type is required, and private, bank, auction and alert_subtypes (new, price_increased, price_decreased, reserved, delisted, sold) narrow it and combine. POST /alerts-api/webhooks/rotate-secret rotates the secret that signs deliveries. The routes under /api/v1/listing-alerts/ read alerts without a webhook.
| Legacy route | What it does | On the platform |
|---|---|---|
GET /api/v1/listing-alerts/feeds | Get feeds list (v1) | No platform route yet |
POST /api/v1/listing-alerts/feeds | Create feed (v1) | No platform route yet |
GET /api/v1/listing-alerts/feeds/{id} | Get alerts by feed (v1) | No platform route yet |
DELETE /api/v1/listing-alerts/feeds/{id} | Delete feed (v1) | No platform route yet |
PUT /api/v1/listing-alerts/feeds/{id}/update | Update feed (v1) | No platform route yet |
POST /api/v1/listing-alerts/search | Search alerts (v1) | No platform route yet |
GET /alerts-api/feeds | List feeds | No platform route yet |
POST /alerts-api/feeds | Create feed | No platform route yet |
GET /alerts-api/feeds/{feed_id} | Get feed | No platform route yet |
DELETE /alerts-api/feeds/{feed_id} | Delete feed | No platform route yet |
PUT /alerts-api/webhooks | Set webhook URL | No platform route yet |
POST /alerts-api/webhooks/rotate-secret | Rotate signing secret | No platform route yet |
References
| Legacy route | What it does | On the platform |
|---|---|---|
GET /api/v1/references/agencies | Get agencies (v1) | No platform route yet |
GET /api/v1/references/agents | Get agents (v1) | No platform route yet |
GET /api/v1/references/conditions | Get conditions (v1) | No platform route yet |
GET /api/v1/references/features | Get features (v1) | No platform route yet |
POST /api/v1/references/locations | Get locations (v1) | GET /v1/locations/search (search by name) |
GET /api/v1/references/locations/by-coordinates | Get location by passed coordinates (v1) | GET /v1/locations/by-coordinates |
POST /api/v1/references/locations/typeahead | Get locations typeahead suggestions scoped by country code (v1) | GET /v1/locations/search (search by name) |
GET /api/v1/references/sources | Get sources (v1) | No platform route yet |
GET /api/v1/references/types | Get types (v1) | No platform route yet |
POST /api/v1/references/zipcode-boundary | Get zipcode boundary by zipcode and country code (v1) | No platform route yet |
Authentication
The sign-in of the routes above: see How to sign in.
| Legacy route | What it does | On the platform |
|---|---|---|
POST /login | Login | A platform API key from the console instead |
GET /refresh-token | Refresh Token | A platform API key from the console instead |
How to sign in
| Base URL | https://api.casafari.com |
| Format | JSON requests and responses |
| Authentication | A bearer token (JWT) from POST /login with your account's email and password, or, for an integration without a person, OAuth2 client credentials: an API client created in your API account's settings, exchanged at POST /oauth/token with grant_type=client_credentials. Platform API keys do not work here; a platform key sent here answers 401. |
| OpenAPI description | /docs/existing-api-customers/openapi.json, with request and response examples. Upstream: https://docs.api.casafari.com/openapi.json |
| Interactive docs | https://docs.api.casafari.com/ |
The API description says about the token:
The API endpoints require an authentication token to be provided with each request. The token must be sent via the
AuthorizationHTTP header, containing the keywordBearerfollowed by your authentication token.
The public description lists the base catalogue. What your account can call depends on its subscription, and the interactive docs show your account's own list after you sign in. For agents, auth.md covers both ways of signing in.
Get a token
- Call
POST /loginwith your account's email and password. The response has anaccess_tokenand arefresh_token. - Send
Authorization: Bearer <access_token>with every other request. - When the access token expires, call
GET /refresh-tokenwith the refresh token as the bearer. A401from it means the refresh token has expired: log in again.
curl -X POST "https://api.casafari.com/login" \
-H "Content-Type: application/json" \
-d '{
"email": "<email>",
"password": "<password>"
}'Then, with the token in an environment variable ($CASAFARI_TOKEN in every example of the Legacy API on this site is a placeholder, never a credential):
curl "https://api.casafari.com/api/v1/references/types" \
-H "Authorization: Bearer $CASAFARI_TOKEN"Some old routes take a static token instead, sent in the Authorization header after the word Token:
curl "https://api.casafari.com/v1/references/types" \
-H "Authorization: Token $CASAFARI_TOKEN"The reference by version
Generated from the API's own description, the reference developer.casafari.com used to show (that address now redirects here):
- API v1: 22 operations at
https://api.casafari.com/v1 - API v2: 3 operations at
https://api.casafari.com/v2
This is the public part of the API. If your account also has services that are not public (cadastre, market data and integrations among them), their reference appears when you log in to your API account.
The old API's whole public description, with request and response examples, is /docs/existing-api-customers/openapi.json.
Where to get your existing token
Your token is issued by Casafari with your API contract and is no longer shown in your API account's settings. If you do not have it, or need it reset, ask your Casafari contact or write to Casafari. Your profile, password and usage statistics are in your API account. This site never asks for a token and never shows one, so there is nothing to enter here.
The new platform
The new platform has its own account and its own keys: sign in at platform.casafari.com/console. You do not need to migrate anything today, and your existing token keeps working. If you want to try the new platform, you can set up its account next to the one you have.
Quota and tokens
The quota in your API contract is set by that contract and is not metered in tokens. Tokens, credits and 402 payment_required errors belong to the new platform and do not apply to your existing API. Casafari publishes no quota or rate-limit figures for existing contracts, so ask Casafari about yours.
Who to contact
If you cannot find your token or something looks wrong, contact Casafari through casafari.com and mention that you are an existing API customer.