# Listar documentos

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

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

Documentos adjuntos a negocios, del más reciente al más antiguo (`pageSize` máximo 100).

Permission required

`documents:read`

Required header

`X-API-Key` · secret key

Access level

Level 2 · automatic on Inmobiliaria Pro

## Query parameters

3 · all optional

`dealId` string · optional

Solo los de este negocio

`page` integer · optional

Página, desde 1 default 1 · ≥ 1

`pageSize` integer · optional

Documentos por página (máximo 100) default 20 · 1–100

## Response 200

`Document[]` · 8 fields

**`data[]` id · name · url · mimeType · size · dealId · createdAt · uploadedBy**

`id` string

`name` string

`url` string

`mimeType` string

`size` integer Tamaño en bytes

`dealId` string

`createdAt` string

**`uploadedBy` 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

## 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
- **403** FORBIDDEN
- **429** RATE_LIMITED
- **500** INTERNAL_ERROR

cURL:

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

Python:

```python
import os, requests

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

**Response · 200 · example**

```json
{
  "data": [
    {
      "id": "clx1doc001",
      "name": "Promesa de compraventa.pdf",
      "url": "https://cdn.bydomu.com/docs/promesa.pdf",
      "mimeType": "application/pdf",
      "size": 245760,
      "dealId": "clx1deal001",
      "createdAt": "2026-09-18T11:30:00.000Z",
      "uploadedBy": {
        "id": "clx1usr001",
        "firstName": "Carlos",
        "lastName": "Rodríguez"
      }
    }
  ],
  "meta": {
    "total": 150,
    "page": 1,
    "pageSize": 20,
    "totalPages": 8
  }
}
```
