# Detalle de documento

GET `https://api.bydomu.com/v1/documents/{id}`

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

Un documento con su URL de descarga.

Permission required

`documents:read`

Required header

`X-API-Key` · secret key

Access level

Level 2 · automatic on Inmobiliaria Pro

## Path parameters

1 · required

`id` string · **required**

ID del documento

## 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

## Possible errors

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

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

cURL:

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

Python:

```python
import os, requests

r = requests.get(
    "https://api.bydomu.com/v1/documents/clx1doc001",
    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"
    }
  }
}
```
