# Listar agentes

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

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

Miembros de la organización con al menos una propiedad publicada en el portal, ordenados por cantidad de propiedades (de más a menos).

Permission required

`portal:read`

Required header

`X-API-Key` · publishable or secret key

Access level

Level 1 · no request

## Response 200

`PortalAgent[]` · 8 fields

**`data[]` id · firstName · lastName · avatarUrl · bio · phone · email · propertyCount**

`id` string

`firstName` string

`lastName` string

`avatarUrl` string

`bio` string

`phone` string

`email` string

`propertyCount` integer Propiedades publicadas del agente

## Possible errors

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

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

cURL:

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

Python:

```python
import os, requests

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

**Response · 200 · example**

```json
{
  "data": [
    {
      "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",
      "propertyCount": 12
    }
  ]
}
```
