# Agentes con agendamiento activo

GET `https://api.bydomu.com/v1/booking/agents`

Agentes de la organización con una página de agendamiento activa, con su `slug`.

Permiso que pide

`portal:read`

Encabezado obligatorio

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

Nivel de acceso

Nivel 1 · sin solicitud

## Respuesta 200

`BookingAgent[]` · 7 campos

**`data[]` slug · id · name · firstName · lastName · avatarUrl · bio**

`slug` string

`id` string

`name` string

`firstName` string

`lastName` string

`avatarUrl` string

`bio` string

## Errores posibles

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

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

cURL:

```bash
curl "https://api.bydomu.com/v1/booking/agents" \
  -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.listAgents();
```

Python:

```python
import os, requests

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

**Respuesta · 200 · ejemplo**

```json
{
  "data": [
    {
      "slug": "carlos-rodriguez",
      "id": "clx1usr001",
      "name": "Carlos Rodríguez",
      "firstName": "Carlos",
      "lastName": "Rodríguez",
      "avatarUrl": "https://cdn.bydomu.com/avatars/carlos.jpg",
      "bio": "Asesor con 10 años en el mercado de Bogotá."
    }
  ]
}
```
