# Página de agendamiento de un agente

GET `https://api.bydomu.com/v1/booking/{slug}/page`

Configuración de la página (duración de los espacios, anticipación, color, mensajes) con el agente y la organización. OJO: la respuesta viene doblemente envuelta, `{ data: { data: ... } }`. Solo páginas de la organización de la clave (otro `slug` → 404).

Permiso que pide

`portal:read`

Encabezado obligatorio

`X-API-Key` · clave publicable o secreta

Nivel de acceso

Nivel 1 · sin solicitud

## Parámetros de ruta

1 · obligatorios

`slug` string · **obligatorio**

Slug de la página de agendamiento del agente

## Respuesta 200

`object` · 1 campos

**`data` data**

**`data` id · slug · isActive · title · welcomeMessage · brandColor · slotDurationMinutes · bufferMinutes · maxDaysAhead · minNoticeHours · timeZone · requireEmail · requirePhone · showProperties · autoConfirm · thankYouMessage · defaultType · agent · organization**

`id` string

`slug` string

`isActive` boolean

`title` string

`welcomeMessage` string

`brandColor` string

`slotDurationMinutes` integer

`bufferMinutes` integer

`maxDaysAhead` integer

`minNoticeHours` integer

`timeZone` string

`requireEmail` boolean

`requirePhone` boolean

`showProperties` boolean

`autoConfirm` boolean

`thankYouMessage` string

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

**`agent` id · firstName · lastName · avatarUrl · bio · phone · email**

`id` string

`firstName` string

`lastName` string

`avatarUrl` string

`bio` string

`phone` string

`email` string

**`organization` id · name · slug · logo · phone · email · website**

`id` string

`name` string

`slug` string

`logo` string

`phone` string

`email` string

`website` string

## Errores posibles

con la forma `{ "error": { "code", "message" } }`

- **401** UNAUTHORIZED
- **403** FORBIDDEN
- **404** NOT_FOUND
- **429** RATE_LIMITED
- **500** INTERNAL_ERROR

cURL:

```bash
curl "https://api.bydomu.com/v1/booking/carlos-rodriguez/page" \
  -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 } = await bydomu.booking.getPage("carlos-rodriguez");
```

Python:

```python
import os, requests

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

**Respuesta · 200 · ejemplo**

```json
{
  "data": {
    "data": {
      "id": "clx1bkp001",
      "slug": "carlos-rodriguez",
      "isActive": true,
      "title": "Agenda una visita con Carlos",
      "welcomeMessage": "Elige el día y la hora que te queden mejor.",
      "brandColor": "#0F766E",
      "slotDurationMinutes": 60,
      "bufferMinutes": 15,
      "maxDaysAhead": 30,
      "minNoticeHours": 12,
      "timeZone": "America/Bogota",
      "requireEmail": false,
      "requirePhone": true,
      "showProperties": true,
      "autoConfirm": false,
      "thankYouMessage": "¡Listo! Te confirmamos por WhatsApp.",
      "defaultType": "SHOWING",
      "agent": {
        "id": "clx1usr001",
        "firstName": "Carlos",
        "lastName": "Rodríguez",
        "avatarUrl": "https://cdn.bydomu.com/avatars/carlos.jpg",
        "bio": "Asesor con 10 años en el mercado de Bogotá.",
        "phone": "+573001234567",
        "email": "carlos@inmobiliariaandes.co"
      },
      "organization": {
        "id": "clx1org001",
        "name": "Inmobiliaria Andes",
        "slug": "inmobiliaria-andes",
        "logo": "https://cdn.bydomu.com/logos/andes.png",
        "phone": "+576015551234",
        "email": "hola@inmobiliariaandes.co",
        "website": "https://inmobiliariaandes.co"
      }
    }
  }
}
```
