# Listar citas

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

Citas de la organización ordenadas por hora de inicio (`sortOrder`, por defecto de la más lejana a la más cercana), con filtros por estado, tipo, responsable, contacto y rango de fechas (`pageSize` máximo 500).

Permiso que pide

`appointments:read`

Encabezado obligatorio

`X-API-Key` · clave secreta

Nivel de acceso

Nivel 2 · automático en Inmobiliaria Pro

## Parámetros de consulta

14 · todos opcionales

`search` string · opcional

Se valida pero no se aplica en esta operación

`status` string · opcional

Estado de la cita SCHEDULED · CONFIRMED · COMPLETED · CANCELLED · NO_SHOW

`type` string · opcional

Tipo de cita SHOWING · MEETING · CALL · FOLLOW_UP · SIGNING · DEMO · OTHER

`assigneeId` string · opcional

Responsable

**Ver los otros 10 parámetros**

`contactId` string · opcional

Contacto

`dealId` string · opcional

Se valida pero no se aplica en esta operación

`dateFrom` string · opcional

Empiezan desde esta fecha (ISO 8601) nullable

`dateTo` string · opcional

Empiezan hasta esta fecha (ISO 8601) nullable

`page` integer · opcional

Página, desde 1 por defecto 1 · ≥ 1

`pageSize` integer · opcional

Citas por página (máximo 500) por defecto 20 · 1–500

`cursor` string · opcional

Se valida pero no se aplica en esta operación

`includeTotal` boolean | string · opcional

Se valida pero no se aplica en esta operación

`sortBy` string · opcional

Se valida pero no se aplica en esta operación: siempre se ordena por `startTime` por defecto "createdAt"

`sortOrder` string · opcional

Orden por hora de inicio asc · desc · por defecto "desc"

## Respuesta 200

`Appointment[]` · 14 campos

**`data[]` id · title · description · type · status · startTime · endTime · color · location · createdAt · contact · deal · property · assignee**

`id` string

`title` string

`description` string

`type` string SHOWING, MEETING, CALL, FOLLOW_UP, SIGNING, DEMO

`status` string SCHEDULED, CONFIRMED, COMPLETED, CANCELLED, NO_SHOW

`startTime` string

`endTime` string

`color` string

`location` string

`createdAt` string

**`contact` id · firstName · lastName · phone**

`id` string

`firstName` string

`lastName` 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)

**`deal` id · title**

`id` string

`title` string

**`property` id · title · city**

`id` string

`title` string

`city` string

**`assignee` id · firstName · lastName**

`id` string

`firstName` string

`lastName` string

**`meta` Paginación por número de página.**

`total` integer Total de registros

`page` integer Página actual

`pageSize` integer Registros por página

`totalPages` integer Total de páginas

## Errores posibles

con la 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/appointments" \
  -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.appointments.list();
```

Python:

```python
import os, requests

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

**Respuesta · 200 · ejemplo**

```json
{
  "data": [
    {
      "id": "clx1apt001",
      "title": "Visita Apto Chapinero",
      "description": "Segunda visita; llevar el certificado de libertad.",
      "type": "SHOWING",
      "status": "SCHEDULED",
      "startTime": "2026-10-02T15:00:00.000Z",
      "endTime": "2026-10-02T16:00:00.000Z",
      "color": "#6366F1",
      "location": "Cra 7 #45-12, Bogotá",
      "createdAt": "2026-09-25T09:00:00.000Z",
      "contact": {
        "id": "clx1con001",
        "firstName": "María",
        "lastName": "González",
        "phone": "+573001234567"
      },
      "deal": {
        "id": "clx1deal001",
        "title": "Venta Apto Chapinero"
      },
      "property": {
        "id": "clx1prop001",
        "title": "Apartamento en Chapinero con vista",
        "city": "Bogotá"
      },
      "assignee": {
        "id": "clx1usr001",
        "firstName": "Carlos",
        "lastName": "Rodríguez"
      }
    }
  ],
  "meta": {
    "total": 150,
    "page": 1,
    "pageSize": 20,
    "totalPages": 8
  }
}
```
