# Listar contactos

GET `https://api.bydomu.com/v1/contacts`

Esta referência é gerada a partir do código da API, por isso as descrições estão em espanhol. Nomes, parâmetros e exemplos são iguais em qualquer idioma.

Contactos de la organización con filtros y paginación por página o por cursor (`pageSize` máximo 500). Los filtros que aceptan varios valores (`status`, `source`, `type`, `tagIds`) van separados por comas.

Permissão pedida

`contacts:read`

Cabeçalho obrigatório

`X-API-Key` · chave secreta

Nível de acesso

Nível 2 · automático na Inmobiliaria Pro

## Parâmetros de consulta

23 · todos opcionais

`search` string · opcional

Nombre, teléfono, correo o código

`status` string[] · opcional

Estados, separados por comas NEW · CONTACTED · QUALIFIED · NEGOTIATING · WON · LOST · INACTIVE · nullable

`archived` string · opcional

`true` para ver solo los archivados true · false

`source` string[] · opcional

Fuentes de captación, separadas por comas WHATSAPP · METROCUADRADO · FINCARAIZ · WEBSITE · REFERRAL · WALK_IN · SOCIAL_MEDIA · PHONE · INMUEBLES24 · VIVANUNCIOS · LAMUDI · PROPIEDADES_COM · URBANIA · ADONDEVIVIR · PLUSVALIA · ZAP_IMOVEIS · VIVAREAL · OLX · IMOVELWEB · PORTAL_INMOBILIARIO · TOCTOC · ZONAPROP · ARGENPROP · OTHER · nullable

**Ver os outros 19 parâmetros**

`type` string[] · opcional

Tipos, separados por comas CLIENT · OWNER · BOTH · nullable

`ownerId` string · opcional

Agente dueño del contacto

`scoreMin` integer · opcional

Puntaje mínimo (0-100) 0–100 · nullable

`scoreMax` integer · opcional

Puntaje máximo (0-100) 0–100 · nullable

`createdAfter` string · opcional

Creados desde esta fecha (ISO 8601)

`createdBefore` string · opcional

Creados hasta esta fecha (ISO 8601)

`lastActivityBefore` string · opcional

Sin actividad desde esta fecha (ISO 8601): leads fríos

`tagId` string · opcional

Obsoleto: usa `tagIds`

`tagIds` string[] · opcional

IDs de etiqueta, separados por comas nullable

`hasDeals` string · opcional

Con (`true`) o sin (`false`) negocios true · false

`awaitingReply` string · opcional

`true`: el cliente escribió de último en una conversación abierta true

`relation` string · opcional

Relación viva con la inmobiliaria ACTIVE · TENANT · OWNER · NEGOTIATING · TALKING

`consent` string · opcional

NO_DATA_CONSENT · DO_NOT_CONTACT

`page` integer · opcional

Página, desde 1 padrão 1 · ≥ 1

`pageSize` integer · opcional

Contactos por página (máximo 500) padrão 20 · 1–500

`cursor` string · opcional

Paginación por cursor: el `meta.nextCursor` de la respuesta anterior

`includeTotal` boolean | string · opcional

`false` para no contar el total (más rápido)

`sortBy` string · opcional

Campo de orden padrão "createdAt"

`sortOrder` string · opcional

Dirección del orden asc · desc · padrão "desc"

## Resposta 200

`ContactListItem[]` · 36 campos

**`data[]` id · code · firstName · lastName · email · phone · phone2 · source · status · type · documentType · documentNumber · score · notes · budget · currency · lookingFor · preferredType · preferredCity · preferredNeighborhood · minBedrooms · minBathrooms · minArea · preferredTransactionType · subscribedToAlerts · whatsappOptIn · marketingOptIn · ownerId · createdAt · updatedAt · owner · tags · _count · relations · lastContact · openDeal**

`id` string

`code` string Código legible del contacto

`firstName` string

`lastName` string

`email` string

`phone` string `null` si el contacto llegó por un canal sin número (Instagram, Facebook, chat de la web, correo o WhatsApp con usuario y número oculto)

`phone2` string

`source` string WHATSAPP, METROCUADRADO, FINCARAIZ, WEBSITE, REFERRAL, WALK_IN

`status` string NEW, CONTACTED, QUALIFIED, NEGOTIATING, WON, LOST

`type` string CLIENT, OWNER, BOTH

`documentType` string CC, CE, NIT, PASSPORT, DNI, RUC

`documentNumber` string

`score` integer Puntaje 0-100

`notes` string

`budget` string Número decimal serializado como texto.

`currency` string

`lookingFor` string

`preferredType` string APARTMENT, HOUSE, OFFICE, COMMERCIAL, LAND, WAREHOUSE

`preferredCity` string

`preferredNeighborhood` string

`minBedrooms` integer

`minBathrooms` integer

`minArea` number

`preferredTransactionType` string

`subscribedToAlerts` boolean

`whatsappOptIn` boolean

`marketingOptIn` boolean

`ownerId` string Agente dueño del contacto

`createdAt` string

`updatedAt` string

**`owner` id · firstName · lastName**

`id` string

`firstName` string

`lastName` string

**`tags[]` contactId · tagId · tag**

`contactId` string

`tagId` string

**`tag` id · name · color**

`id` string

`name` string

`color` string

**`_count` deals · whatsappMessages**

`deals` integer

`whatsappMessages` integer

`relations` string[] TENANT, OWNER, NEGOTIATING, TALKING

**`lastContact` at · channel**

`at` string

`channel` string WHATSAPP, INSTAGRAM, FACEBOOK, SMS, EMAIL, WEB

**`openDeal` Negocio abierto más relevante del contacto**

`id` string

`title` string

`stageName` string

`position` integer

`count` integer

`isWon` boolean

`propertyTitle` string

**`meta` Paginación por página (`page`) o por cursor (`cursor` = `nextCursor` de la respuesta anterior). Con cursor no se cuenta el total, que es lo más rápido para recorrer todo.**

`total` integer Total de registros. `null` al paginar con `cursor` o con `includeTotal=false`.

`page` integer

`pageSize` integer

`totalPages` integer `null` cuando no se contó el total.

`nextCursor` string Pásalo como `cursor` para pedir la página siguiente. `null` en la última.

`hasMore` boolean Hay más registros después de esta página.

## Erros possíveis

com a forma `{ "error": { "code", "message" } }`

- **400** Datos inválidos: el cuerpo o la query no cumplen el esquema, o `Idempotency-Key` está mal formada.
- **401** UNAUTHORIZED
- **403** FORBIDDEN
- **429** RATE_LIMITED
- **500** INTERNAL_ERROR

cURL:

```bash
curl "https://api.bydomu.com/v1/contacts" \
  -H "X-API-Key: $BYDOMU_API_KEY"
```

JavaScript:

```js
import { ByDomu } from "@bydomu/sdk";

const bydomu = new ByDomu({
  apiKey: process.env.BYDOMU_API_KEY,
});

const { data, meta } = await bydomu.contacts.list();
```

Python:

```python
import os, requests

r = requests.get(
    "https://api.bydomu.com/v1/contacts",
    headers={"X-API-Key": os.environ["BYDOMU_API_KEY"]}
)
data = r.json()
```

**Resposta · 200 · exemplo**

```json
{
  "data": [
    {
      "id": "clx1con001",
      "code": "C-0107",
      "firstName": "María",
      "lastName": "González",
      "email": "maria.gonzalez@email.com",
      "phone": "+573001234567",
      "phone2": "+573109876543",
      "source": "WHATSAPP",
      "status": "NEW",
      "type": "CLIENT",
      "documentType": "CC",
      "documentNumber": "1020304050",
      "score": 75,
      "notes": "Busca apartamento cerca al trabajo.",
      "budget": "350000000.00",
      "currency": "COP",
      "lookingFor": "Apartamento de 3 habitaciones",
      "preferredType": "APARTMENT",
      "preferredCity": "Bogotá",
      "preferredNeighborhood": "Chapinero",
      "minBedrooms": 3,
      "minBathrooms": 2,
      "minArea": 70,
      "preferredTransactionType": "SALE",
      "subscribedToAlerts": true,
      "whatsappOptIn": true,
      "marketingOptIn": false,
      "ownerId": "clx1usr001",
      "createdAt": "2026-01-15T14:30:00.000Z",
      "updatedAt": "2026-09-20T09:15:00.000Z",
      "owner": {
        "id": "clx1usr001",
        "firstName": "Carlos",
        "lastName": "Rodríguez"
      },
      "tags": [
        {
          "contactId": "clx1con001",
          "tagId": "clx1tag001",
          "tag": {
            "id": "clx1tag001",
            "name": "VIP",
            "color": "#F59E0B"
          }
        }
      ],
      "_count": {
        "deals": 1,
        "whatsappMessages": 24
      },
      "relations": [
        "NEGOTIATING"
      ],
      "lastContact": {
        "at": "2026-09-24T16:02:00.000Z",
        "channel": "WHATSAPP"
      },
  …
```
