> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleo-pay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a file link

> GET /v1/payables/{payableId}/files/{attachmentId} returns a signed download link, valid for 15 minutes, for one file attached to a bill.

```
GET /v1/payables/{payableId}/files/{attachmentId}
```

**Scope:** `payables:read`

**payableId** `string` *required*

The bill's `id`.

**attachmentId** `string` *required*

An `id` from the bill's `attachments`, from [`GET /v1/payables/{payableId}`](https://docs.cleo-pay.com/api-reference/payables/get).

```bash theme={null}
curl "https://api.stg.cleo-pay.com/v1/payables/b1e2c3d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e/files/7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f" \
  --header "Authorization: Bearer $CLEO_API_KEY"
```

## Response

`200` with a signed link.

**url** `string`

The download link. Anyone who holds it can download the file until it expires, so do not log it or share it.

**expiresAt** `string`

When the link stops working, ISO 8601, 15 minutes after it was issued.

```json theme={null}
{
  "url": "https://s3.us-west-2.amazonaws.com/...?X-Amz-Expires=900&X-Amz-Signature=...",
  "expiresAt": "2026-10-29T10:15:00.000Z"
}
```

Download the file right away, or store your own copy. To download it later, request a new link. Each call returns a fresh link.

## Which files you see

You see a file when it is shared with both sides of the bill, or when your business attached it. A file the other party attached for its own records only is not listed in `attachments`, and this call answers `404` for it.

## Errors

| Code | When |
| - | - |
| `not_found` | The bill does not exist or your business cannot see it. Or the attachment does not exist, belongs to another bill, or is not visible to your business. These attachment cases share one message, `File not found`. |
| `forbidden_scope` | The key lacks `payables:read`, or its member's role cannot view bills. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.