---
title: "Initialize an AI Builder session (v2)"
method: POST
path: "/api/v2/comparables/ai-builder"
tags: ["api---comparables"]
---

# Initialize an AI Builder session (v2)

`POST /api/v2/comparables/ai-builder`

## Request

- Base URL: `https://api.casafari.com`
- URL: `https://api.casafari.com/api/v2/comparables/ai-builder`
- Auth: HTTP bearer

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

- ApiAIBuilderRequestV2
  - `valuation_id` integer, required: ID of the saved CMA to build the session from.
  - `agent` object, nullable: Agent data to display in the Builder.
    - `first_name` string, required: First name of the agent displayed in the Builder.
    - `last_name` string, nullable: Last name of the agent displayed in the Builder.
    - `shop_name` string, nullable: Name of the agency or brokerage displayed alongside the agent information.
    - `photo_url` string, uri, nullable: URL to the profile picture of the agent.
    - `email` string, email, nullable: Agent's email address displayed in the Builder and available for client contact.
    - `phone` string, nullable: Phone number of the agent.
    - `whatsapp` string, nullable: Agent's WhatsApp phone number displayed as a contact option. Include the country code.
    - `instagram` string, nullable: Agent's Instagram username or profile identifier displayed in the Builder.
    - `telegram` string, nullable: Agent's Telegram username displayed in the Builder.
    - `agent_webpage` string, uri, nullable: Public URL of the agent's personal or professional webpage.
    - `agent_bio` string, nullable: Short biography or description of the agent. Displayed in the Builder only if the `photo_url` field is provided in the request.
  - `language` 'en' | 'es' | 'pt': Language of the Builder session.
  - `external_ref` string, nullable

## Response `200`

- ApiAIBuilderResponseV2
  - `id` string, required: ID of the initialized AI Builder session.
  - `url` string, required: URL of the initialized AI Builder session.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

[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)
