---
title: "Create Lead"
method: POST
path: "/api/v1/specialist/leads"
---

# Create Lead

`POST /api/v1/specialist/leads`

## Request

- Base URL: `https://trovastorage.it` (the document declares no server; this is the origin it was published from)
- URL: `https://trovastorage.it/api/v1/specialist/leads`
- Auth: one of:
  - API key in header `X-Access-Token`
  - HTTP bearer

A cold request from the web, resolved and put in front of a human.

Whatever `interpretation` claims, the numbers are recomputed here. That is
the whole of M6.0 in one handler: the model interprets, the invariants decide.

## Request body

- LeadCreateRequest: What the public path posts. The server trusts nothing here for a number. `interpretation` is the model's account of how it read the request (M6.2). It is archived verbatim and never consulted: the resolution is recomputed server-side from lat/lng/class, and that recomputation is what the inbox shows. The boundary of M6.0, in one request body.
  - `original_text` string, required
  - `lat` number, required
  - `lng` number, required
  - `operator_slug` string, nullable
  - `size_class_m2` integer, required
  - `radius_km` number
  - `features` string[]
  - `origin` VisitOrigin: What the browser kept from the first page of the visit (M6): that page's `utm_source`, the host that linked to it and its path. Untrusted, all of it: `services/origin.py` decides what it means.
    - `source` string, nullable
    - `referrer` string, nullable
    - `page` string, nullable
  - `conversation_id` string, uuid, nullable
  - `preferred_site_id` string, uuid, nullable
  - `interpretation` object, nullable
  - `contact_name` string, nullable
  - `contact_email` string, email, nullable
  - `contact_phone` string, nullable

## Response `201`

Successful Response

- LeadCreateResponse
  - `lead_id` string, uuid, required
  - `site_id` string, uuid, nullable, required
  - `size_class_m2` integer, required
  - `resolution` SpecialistResolution, required
    - `size_class_m2` integer, required
    - `band_min_m2` number, required
    - `band_max_m2` number, nullable, required
    - `radius_km` number, required
    - `free_count` integer, required
    - `centres` ResolvedCentre[], required
      - `site_id` string, uuid, required
      - `name` string, required
      - `city` string, required
      - `lat` number, required
      - `lng` number, required
      - `distance_km` number, required
      - `free_count` integer, required
      - `operator` string
      - `listing_url` string, nullable
      - `declared` string, nullable
    - `alternatives` ResolvedAlternative[], required
      - `kind` string, required
      - `size_class_m2` integer, required
      - `radius_km` number, required
      - `free_count` integer, required
      - `centres` ResolvedCentre[], required
        - `site_id` string, uuid, required
        - `name` string, required
        - `city` string, required
        - `lat` number, required
        - `lng` number, required
        - `distance_km` number, required
        - `free_count` integer, required
        - `operator` string
        - `listing_url` string, nullable
        - `declared` string, nullable
      - `dropped_features` string[]
    - `zero_results` boolean, required
    - `sites_in_range` integer
    - `coverage` string[]
    - `unavailable_features` string[]
    - `frees_up` ResolvedFreesUp[]
      - `site_id` string, uuid, required
      - `name` string, required
      - `distance_km` number, required
      - `free_from` string, date, required
    - `access_rules` string[]
  - `held` boolean
  - `distribution_state` string

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/trovastorage/apis/stock-your-inventory.md) · [All operations](https://skmtc.dev/trovastorage/apis/stock-your-inventory/llms.txt) · [OpenAPI document](https://skmtc.dev/trovastorage/apis/stock-your-inventory/revisions/c75f591a585c?raw)
