# List leads

URL: https://api-docs.vestta.io/leads/list

Return the leads of the workspace, newest first.

Returns every lead of the workspace — whatever its type or status, and however it was created — ordered by creation date, newest first.

Leads contain personal data: names, phone numbers and emails. Grant `leads:read` only to systems that need it, such as a CRM sync, and never to a key used by a public website.

Internal CRM data is not part of the response: notes, ID documents, rating and scoring, assigned agent, capture details and follow-up dates stay in Vestta.

## Pagination

`count` is the number of leads **in this page**, not the total. Keep requesting pages while `count` equals `limit`. See [Pagination](/pagination#paging-through-leads).

The endpoint has no filters. To pick up new leads periodically, page from `offset=0` and stop when you reach a `created_at` (or an `id`) you have already processed.

### GET /v1/leads

Lists the business contacts. Requires the `leads:read` scope.

Required scope: `leads:read`

Query parameters:
- `limit` (integer, optional, ≥ 1, ≤ 1000, default 100)
- `offset` (integer, optional, ≥ 0, default 0)

Response 200: Successful response.
- `status` (string, required, values: `ok`)
- `data` (array of objects, required)
  - `id` (integer, required): Numeric lead ID.
  - `name` (string, optional, nullable)
  - `type` (string, optional, nullable): `demandante` (looking for a property), `propietario` (owner), `agencia-inmobiliaria`, `entidad-bancaria` or `proveedor-servicios`.
  - `status` (string, optional, nullable): Pipeline status, e.g. `new`, `searching_property`, `active_negotiation`, `closed` or `inactive`.
  - `active` (boolean, optional, nullable)
  - `source` (string, optional, nullable): Where the lead came from, e.g. `web`, `manual`, or the `source` sent on ingestion.
  - `phone_number_1` (string, optional, nullable): Primary phone in E.164 format.
  - `phone_number_2` (string, optional, nullable)
  - `landline_phone` (string, optional, nullable)
  - `personal_email` (string, optional, nullable)
  - `professional_email` (string, optional, nullable)
  - `preferred_language` (string, optional, nullable): `es`, `gb`, `fr`, `ge` or `it`.
  - `search_preferences` (array of objects, optional, nullable): Structured search requests without internal notes.
    - `request_id` (string, optional, nullable)
    - `operations` (array of strings, optional)
    - `property_types` (array of strings, optional)
    - `locations` (array of objects, optional)
    - `apartamento` (ApartmentPreferences, optional)
      - `requireds` (array of strings, optional)
      - `specs` (object, optional, nullable)
      - `views` (array of strings, optional, nullable)
      - `features` (array of strings, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `size_max` (integer, optional, nullable)
      - `size_min` (integer, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
      - `bedrooms_min` (integer, optional, nullable)
      - `bathrooms_min` (integer, optional, nullable)
      - `num_terraces_min` (integer, optional, nullable)
      - `size_terraces_min` (integer, optional, nullable)
      - `doble_bedrooms_min` (integer, optional, nullable)
      - `suite_bathrooms_min` (integer, optional, nullable)
    - `casa` (HousePreferences, optional)
      - `requireds` (array of strings, optional)
      - `specs` (object, optional, nullable)
      - `views` (array of strings, optional, nullable)
      - `features` (array of strings, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `size_max` (integer, optional, nullable)
      - `size_min` (integer, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
      - `bedrooms_min` (integer, optional, nullable)
      - `bathrooms_min` (integer, optional, nullable)
      - `num_terraces_min` (integer, optional, nullable)
      - `size_terraces_min` (integer, optional, nullable)
      - `doble_bedrooms_min` (integer, optional, nullable)
      - `suite_bathrooms_min` (integer, optional, nullable)
      - `plot_size_min` (integer, optional, nullable)
      - `porch_size_min` (integer, optional, nullable)
    - `local` (LocalPreferences, optional)
      - `requireds` (array of strings, optional)
      - `specs` (object, optional, nullable)
      - `features` (array of strings, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `size_max` (integer, optional, nullable)
      - `size_min` (integer, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
      - `height_min` (integer, optional, nullable)
      - `facade_meters_min` (integer, optional, nullable)
      - `showcase_meters_min` (integer, optional, nullable)
      - `bathrooms_min` (integer, optional, nullable)
    - `nave` (NavePreferences, optional)
      - `requireds` (array of strings, optional)
      - `specs` (object, optional, nullable)
      - `features` (array of strings, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `size_max` (integer, optional, nullable)
      - `size_min` (integer, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
      - `height_min` (integer, optional, nullable)
      - `facade_meters_min` (integer, optional, nullable)
      - `showcase_meters_min` (integer, optional, nullable)
    - `almacenaje` (StoragePreferences, optional): Preferencias para almacenes y trasteros independientes.
      - `requireds` (array of strings, optional)
      - `features` (array of strings, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `size_max` (integer, optional, nullable)
      - `size_min` (integer, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
    - `oficina` (OficinaPreferences, optional)
      - `requireds` (array of strings, optional)
      - `specs` (object, optional, nullable)
      - `features` (array of strings, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `size_max` (integer, optional, nullable)
      - `size_min` (integer, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
      - `offices_min` (integer, optional, nullable)
      - `bathrooms_min` (integer, optional, nullable)
      - `meeting_rooms_min` (integer, optional, nullable)
      - `num_terraces_min` (integer, optional, nullable)
      - `size_terraces_min` (integer, optional, nullable)
    - `terreno` (TerrenoPreferences, optional)
      - `requireds` (array of strings, optional)
      - `views` (array of strings, optional, nullable)
      - `features` (array of strings, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `topography` (array of strings, optional, nullable)
      - `size_max` (integer, optional, nullable)
      - `size_min` (integer, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
      - `size_built_min` (integer, optional, nullable)
    - `aparcamiento` (AparcamientoPreferences, optional)
      - `requireds` (array of strings, optional)
      - `features` (array of strings, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `min_seats` (integer, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
    - `edificio` (BuildingPreferences, optional)
      - `requireds` (array of strings, optional)
      - `specs` (object, optional, nullable)
      - `features` (array of strings, optional, nullable)
      - `size_max` (integer, optional, nullable)
      - `size_min` (integer, optional, nullable)
      - `subtypes` (array of strings, optional, nullable)
      - `price_max` (integer, optional, nullable)
      - `price_min` (integer, optional, nullable)
      - `price_rent_max` (integer, optional, nullable)
      - `price_rent_min` (integer, optional, nullable)
      - `num_floors_min` (integer, optional, nullable)
      - `num_locales_min` (integer, optional, nullable)
      - `usable_area_min` (integer, optional, nullable)
      - `num_parkings_min` (integer, optional, nullable)
      - `num_viviendas_min` (integer, optional, nullable)
    - `title` (string, optional, nullable)
    - `color` (string, optional, nullable)
    - `urgency` (string, optional, nullable)
    - `status` (string, optional, nullable)
  - `created_at` (string, optional, nullable): ISO 8601 timestamp with UTC offset. Leads are ordered by this field, newest first.
  - `updated_at` (string, optional, nullable): ISO 8601 timestamp with UTC offset.
- `count` (integer, required): Total contacts in the business, across all pages.
- `limit` (integer, required): The `limit` that was applied.
- `offset` (integer, required): The `offset` that was applied.
- `authenticated_as` (string, optional, nullable): Name of the business that owns the API key.

```json
{
  "status": "ok",
  "data": [
    {
      "id": 227,
      "name": "Ana García",
      "type": "demandante",
      "status": "searching_property",
      "active": true,
      "source": "web",
      "phone_number_1": "+34600111222",
      "preferred_language": "es",
      "search_preferences": [
        {
          "operations": [
            "alquiler"
          ],
          "property_types": [
            "apartamento"
          ],
          "locations": [
            {
              "name": "Madrid"
            }
          ]
        }
      ],
      "created_at": "2026-09-29T18:24:55.569028+02:00",
      "updated_at": "2026-09-29T18:24:55.569028+02:00"
    }
  ],
  "count": 1,
  "limit": 20,
  "offset": 0,
  "authenticated_as": "Inmobiliaria Ejemplo"
}
```

Response 401: The API key is missing, malformed, unknown, revoked or expired.

Response 403: The API key lacks the required scope, or the business plan does not include API access.

Response 404: The resource does not exist in this business.

Response 409: Duplicate contact or idempotency key reused with a different payload.

Response 422: A path parameter, query parameter or body field is invalid.

Response 429: The API key reached its request limit. Wait for the number of seconds in `Retry-After` before retrying.

Response 500: Unexpected server error while processing the request.

### Example requests

#### cURL

```bash
curl "https://api.vestta.io/v1/leads?limit=20" \
  -H "X-Api-Key: $VESTTA_API_KEY"
```

#### JavaScript

```javascript
const response = await fetch('https://api.vestta.io/v1/leads?limit=20', {
  headers: { 'X-Api-Key': process.env.VESTTA_API_KEY },
})

const data = await response.json()
```

#### Python

```python
import os

import requests

response = requests.get(
    "https://api.vestta.io/v1/leads",
    headers={"X-Api-Key": os.environ["VESTTA_API_KEY"]},
    params={
        "limit": 20,
    },
)
response.raise_for_status()
data = response.json()
```
