# Crear contacto

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

This reference is generated from the API’s code, so descriptions are in Spanish. Names, parameters and examples are the same in every language.

Crea un contacto en el CRM. El teléfono es único por organización: si ya existe responde `409 DUPLICATE`. Respeta el tope de contactos del plan (`403 PLAN_LIMIT_REACHED`). El dueño por defecto es quien creó la API key. La respuesta no incluye las etiquetas asignadas con `tags`.

Permission required

`contacts:write`

Required header

`X-API-Key` · secret key

Access level

Level 3 · with support review

## Headers

1 · all optional

`Idempotency-Key` string · optional

Clave única de la operación (8-128 caracteres de `[a-zA-Z0-9._:-]`). Un reintento con la misma clave y el mismo cuerpo devuelve la respuesta original sin repetir la operación. Vive 24 horas. 8–128 chars

## Body (JSON)

28 · 2 required

`firstName` string · **required**

2–100 chars

`phone` string · **required**

`lastName` string · optional

≤ 100 chars

`email` string · optional

email

`phone2` string · optional

`source` string · optional

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 · default "OTHER"

**See the other 22 parameters**

`status` string · optional

NEW · CONTACTED · QUALIFIED · NEGOTIATING · WON · LOST · INACTIVE · default "NEW"

`type` string · optional

CLIENT · OWNER · BOTH · default "CLIENT"

`documentType` string · optional

CC · CE · NIT · PASSPORT · DNI · RUC · CURP · RFC · CPF · CNPJ · RG · RUT · CUIT · SSN · EIN · OTHER · nullable

`documentNumber` string · optional

≤ 50 chars

`birthDate` string · optional

nullable

`score` integer · optional

default 0 · 0–100 · nullable

`notes` string · optional

≤ 5000 chars

`budget` number · optional

≥ 0 · nullable

`currency` string · optional

COP · USD · EUR · MXN · BRL · ARS · BOB · CAD · CLP · CRC · CUP · DOP · GBP · GTQ · HNL · NIO · PEN · PYG · UYU · VES · default "COP"

`lookingFor` string · optional

≤ 500 chars

`preferredType` string · optional

APARTMENT · HOUSE · OFFICE · COMMERCIAL · LAND · WAREHOUSE · ROOM · FARM · OTHER · nullable

`preferredCity` string · optional

≤ 100 chars

`preferredNeighborhood` string · optional

≤ 100 chars

`minBedrooms` integer · optional

≥ 0 · nullable

`minBathrooms` integer · optional

≥ 0 · nullable

`minArea` number · optional

≥ 0 · nullable

`preferredTransactionType` string · optional

SALE · RENT · BOTH · nullable

`ownerId` string · optional

`jobTitle` string · optional

≤ 120 chars

`companyId` string · optional

`tagIds` string[] · optional

`tags` string[] · optional

Etiquetas por nombre. Se crean las que no existan y se AGREGAN a las que ya tenga el contacto.

## Response 201

`ContactRecord` · 31 fields

**`data` Contacto al crearlo o actualizarlo. Las etiquetas asignadas con `tags` no se reflejan aquí.**

`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

## Possible errors

shaped as `{ "error": { "code", "message" } }`

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

cURL:

```bash
curl -X POST "https://api.bydomu.com/v1/contacts" \
  -H "X-API-Key: $BYDOMU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "firstName": "María",
  "lastName": "González",
  "phone": "+573001234567",
  "email": "maria.gonzalez@email.com",
  "source": "WEBSITE",
  "type": "CLIENT",
  "budget": 350000000,
  "preferredType": "APARTMENT",
  "preferredCity": "Bogotá",
  "tags": [
    "VIP",
    "Inversionista"
  ]
}'
```

JavaScript:

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

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

const { data } = await bydomu.contacts.create({
  "firstName": "María",
  "lastName": "González",
  "phone": "+573001234567",
  "email": "maria.gonzalez@email.com",
  "source": "WEBSITE",
  "type": "CLIENT",
  "budget": 350000000,
  "preferredType": "APARTMENT",
  "preferredCity": "Bogotá",
  "tags": [
    "VIP",
    "Inversionista"
  ]
});
```

Python:

```python
import os, requests

r = requests.post(
    "https://api.bydomu.com/v1/contacts",
    headers={"X-API-Key": os.environ["BYDOMU_API_KEY"]},
    json={
        "firstName": "María",
        "lastName": "González",
        "phone": "+573001234567",
        "email": "maria.gonzalez@email.com",
        "source": "WEBSITE",
        "type": "CLIENT",
        "budget": 350000000,
        "preferredType": "APARTMENT",
        "preferredCity": "Bogotá",
        "tags": [
            "VIP",
            "Inversionista"
        ]
    }
)
data = r.json()
```

**Response · 201 · example**

```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"
    }
  }
}
```
