# Download a CRM document preview image

`GET /v1/crm-documents/:id/image` streams the generated bytes. The `:id` is the document ID returned by `GET /v1/crm-documents`. The route requires `X-Api-Key` with the `crm` scope; a READONLY key may use it. The machine URL in the document response points here.

```bash
curl -H "X-Api-Key: $VIBE_API_KEY" \
  "https://vibecode.bitrix24.com/v1/crm-documents/1923/image" -o document.png
```

The response is a binary stream with `Content-Type` from Bitrix24 and `Content-Disposition`. The Bitrix24 download URL is never returned.

| HTTP | Meaning |
|---|---|
| 400 | Invalid document ID |
| 401 | Missing or invalid API key |
| 403 | Missing `crm` scope or portal access |
| 404 | Document not found |
| 409 | This representation is still being generated; retry later |
| 422 | Bitrix24 rejected the request |
| 502 | Bitrix24 could not provide the binary file |

See [CRM document listing](./crm-list.md).
