Comparables & Valuation · REST API
Initialize an AI Builder session (v2)
https://api.casafari.com/api/v2/comparables/ai-builderSend Authorization: Bearer $CASAFARI_TOKEN; see how to get a token.
Over MCP: no tool does this. MCP and REST compared.
Description
Initializes an AI Builder session from a saved CMA (valuation) and returns the generated report ID along with the URL of the AI Builder session.
Request body
Content type application/json. Optional. Type: object.
valuation_idintegerrequiredagentobjectnullable11 properties
first_namestringrequiredlast_namestringnullableshop_namestringnullablephoto_urlstring (uri)nullable^(?:[a-z0-9.+-]*)://(?:[^\s:@/]+(?::[^\s:@/]*)?@)?(?:(?:0|25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?)(?:\.(?:0|25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?)){3}|\[[0-9a-f:.]+\]|([a-z¡-0-9](?:[a-z¡-0-9-]{0,61}[a-z¡-0-9])?(?:\.(?!-)[a-z¡-0-9-]{1,63}(?<!-))*\.(?!-)(?:[a-z¡--]{2,63}|xn--[a-z0-9]{1,59})(?<!-)\.?|localhost))(?::[0-9]{1,5})?(?:[/?#][^\s]*)?\zemailstring (email)nullablephonestringnullablewhatsappstringnullableinstagramstringnullabletelegramstringnullableagent_webpagestring (uri)nullable^(?:[a-z0-9.+-]*)://(?:[^\s:@/]+(?::[^\s:@/]*)?@)?(?:(?:0|25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?)(?:\.(?:0|25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?)){3}|\[[0-9a-f:.]+\]|([a-z¡-0-9](?:[a-z¡-0-9-]{0,61}[a-z¡-0-9])?(?:\.(?!-)[a-z¡-0-9-]{1,63}(?<!-))*\.(?!-)(?:[a-z¡--]{2,63}|xn--[a-z0-9]{1,59})(?<!-)\.?|localhost))(?::[0-9]{1,5})?(?:[/?#][^\s]*)?\zagent_biostringnullablephoto_url field is provided in the request.languagestringen es ptexternal_refstringnullableExample request
Placeholders only: replace the token and the values with your own.
curl -X POST "https://api.casafari.com/api/v2/comparables/ai-builder" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"valuation_id": 1,
"agent": {
"first_name": "John",
"last_name": "Doe",
"shop_name": "Example Realty",
"photo_url": "https://example.com/photo.jpg",
"email": "john.doe@example.com",
"phone": "+351912345678",
"whatsapp": "+351912345678",
"instagram": "example_agent",
"telegram": "example_agent",
"agent_webpage": "https://example.com/agent-page",
"agent_bio": "Experienced real estate agent."
},
"language": "en",
"external_ref": "CRM-12345"
}'Responses
200 OK
Type: object.
Show the response shape (2 fields)
idstringrequiredurlstringrequiredExample from the API description
{
"id": "6a43a32841b3e35c735b9053",
"url": "https://www.casafari.com/market-report/valuation/builder/6a43a32841b3e35c735b9053"
}401 Unauthorized
Type: object.
Show the response shape (1 fields)
detailstring403 Forbidden
Type: object.
Show the response shape (1 fields)
detailstring404 Not Found
Type: object.
Show the response shape (1 fields)
errorsobject